The roommates are infinitely more important in the decision than the place you'll be living. What are your plans - to rent a place, then look for roommates? Or is this a place where someone is looking for a roommate? There's a huge difference. If you rent it and sublet it to others, you're the guy on the hook when they trash a room or move out unexpectedly. It's usually less of a headache to find someone looking for a roommate to fill a bedroom, or to look for a place to rent with friends. Whatever you do, make sure everyone is one a/the lease, and that everyone has a portion of the security deposit.
A standalone house or duplex/triplex is best. Back in the day I lived in a couple of big old houses that were chopped up into multiple apartments, and that's the worst. You have little or no choice over the neighbors, and those setups very often aren't as good for multiple units as a standard apartment building. You hear everything going on, and often these units aren't fully separated, sometimes sharing a water heater, or even being on one furnace. That's unbelievably frustrating.
I've been on both sides of the asshole neighbor in the other unit battles. When I was 19 and a college sophomore, drunk and blasting Pink Floyd at 2AM and bothering the hell out of the two young college professors living upstairs. And later, having to put up with four 20-something drug dealers who often partied into the next afternoon.