Before there was Google, there were phone books. And before phone books, there were...city directories. These aimed to list residents of a city, sometimes with occupation and other info. The directories on Ancestry can be searched, but also browsed; they often contain maps, images, and statistics on a town.
Scanned city directories can also be found on Google Books, HathiTrust, and Internet Archive.