Office space with walls is limited but there's lots of coworking space - check out loosecubes.com to search it. Private reserved desks are ~$500/mo.
Apartments: nybits.com / streeteasy.com / nakedapartments.com. Look for no fee apartments. Brokers here take 15% of your annual rent as a commission and renters generally have to pay that. They'll also want to make sure you make 40x your rent. For example, $2500/mo apartment (~650sq ft in Manhattan) == prove you make $100k/yr with 2 years of tax returns, financial statements. If they could take a blood sample I think they probably would.
For camaraderie, go to events at GeneralAssemb.ly, check out meetups, check out Hackers & Founders.