Let's face it- the lines these days at Starbucks' bathrooms are just way too long! To find lists of public bathrooms look at The Bathroom Diaries, (that's one diary I hope doesn't have too much detail). Or check out NY restrooms.
Try hotels, libraries, free museums, department stores, the few Apple stores around town. Penn Station/Port Authority and Grand Central all have decent bathrooms.
McDonalds, Panera Bread, Chipotle are all chain restaurants that usually have restrooms. Restaurants with a packed outdoor seating section -- just stroll on in like you are one of the diners outside! Good luck!