Just so you know, it's an hour's drive between Horseshoe Meadows and Whitney Portal. You can't "just camp anywhere", but there are a number of one-night-only walk-in sites at HM, with bear boxes. It is so open and flat that you can easily find a place to set up an overnight spot. I would suggest going there earlier, as you get more/better acclimatization at the higher altitude.

Bears: There are bear boxes, but I've never seen a bear in one wink No need to carry any deterrents. They only want your food, and they are much more prevalent at Whitney Portal.