This is a fun and interesting question. Car and Driver just did a somewhat video in their Window Shopping series where the challenge to the editors was to find the fastest car available for $10,000 or less. It's a fun watch if you have a few minutes to spare.
https://www.caranddriver.com/news/a34389097/quickest-used-cars-under-dollar10000-window-shop-with-car-and-driver/
My suggestion for an all around fun daily driver that could be tracked would be a BMW 335, which should fit into the budget easily, or a 340 if you could find one for under $20,000.
Of course an older Boxster or Cayman would be right up there too. Have current generation Mustangs gotten down to the sub-$20,000 range? That's a lot of car for the money.