You're making it sound like this is some difficult research problem. The answer to homelesness is simple: give them homes. Give them food. Give them money. This is how it works in every industrial society that's solved the problem.
Your error is that you're obsessed with trying to fix this within a market economy, by specifically housing them in areas of high economic activity where they can supposedly find "opportunity". That won't work and is counterproductive.