My recommendations for day hikes are below, assuming you’ve never been to Yosemite and would like to see all the major attractions:
Clouds Rest from Sunrise Trail Head(quiet, few people, fantastic views). I’d give this the #1 recommendation, you won’t be disappointed.
Mist trail(Happy Trail to Nevada Falls, then Panorama Trail to Glacier Point then 4 Mile Hike to Valley(Mist trail is going to be crowed, lots of tourists). Beautiful view of Nevada and Vernal Falls. Easier method, take bus to Glacier Point, then hike down Panorama and Mist Trails). This route is not the typical remote back-country route, it’s going to be busy, but it has some beautiful views.
Yosemite Falls: After viewing top of falls, head east to Yosemite Point for better views of the eastern end of the valley.
There’s other great hikes out of TM, I’ll let others recommend those hikes.
For permits, you’d be surprise how sometimes they’re available. In 2014 I pulled two JMT permits at 3PM on July 5 for that day.
Where are you staying? Not sure if you’ll be able to find a place for a decent price. If you pull a permit for a remote, seldom used trail head you can use the backpacker’s campsites in the Valley for the day before and the day of leaving.