Footnote.com has the Manhattan directories from 1786 to 1922. Brooklyn is covered from 1862 to 1913.
I have typed in addresses in their keyword search feature and it has come up with the names of people who were living there.
Your State library may offer free home access to Footnote.