This article about homeless encampments makes some valid points, but the massive cause of massive homelessness is DRUG ADDICTION, not bad luck.
A minority of the homeless are there because of mental illness. And by "minority", I mean about 25%. That's still a large number of people, but it's not the majority.
If we started treating these addicts instead of letting them walk around shitting in public, we wouldn't be seeing a massive surge in homelessness. Treatment can be many things, but we first need to admit that these are addicts. They're not going to stop until they're forced to stop, and many times even then they won't stop using. Dealing with addicts also means accepting the fact that many of them are going to die from their addictions no matter how much you try to help them quit.
If we stopped enabling these addicts, there would be less of them. That means stop making it easy for them to take over cities. Stop giving them needles. Stop giving them places to do their drugs. Stop giving them money. Stop giving them free crap without demanding that they be clean and sober while they get that free crap, and if they walk away, then you let them walk away empty handed. Addicts as a whole will never change their behavior until they hit their personal rock bottom, whatever that happens to be for that person. Making it easier for them to continue their addict lifestyle makes it less likely that they will ever hit rock bottom.
And finally, if this country starts to treat the addictions and not just pat them on the head and give them a tent and a port-o-john, realize that treatment can mean long-term incarceration, followed by years of therapy and anti-narcotics. Which means yes, you're going to lock them up until they're sober, and then you're going to help them remain sober. The money spent on that will still be cheaper than the billions of dollars per city being thrown down shithole after shithole (and of course into the pockets of the politically connected).
Until people face the facts that this is a drug addiction problem, the homeless will never go away.