Zoning laws can pose a lot of restrictions on where those houses can be built, so it depends heavily on the city. Basic physical obstructions and topology also play a role. Adding more homes onto far out suburbs isn't going to do much to massage the problem of unaffordable housing near downtown office districts if it means that homeowners have to commute an untenable distance.