My wife worked in the mental healthcare system for 35 years.
I myself volunteered when possible.
There are three levels basically.
The third level are the criminal.
The second are the mentally ill.
Those two levels have several sub levels and cross over into each level.
The first level are those who are homeless because of economic reasons. Very rare those to be criminal, but sometimes resort to drugs-to forget/cope with their misery.
Finland has nearly solved their homeless crisis. The number one issue is HOUSING. HOUSING, HOUSING.
From there, the help can be brought to solve most of the issues for the First level and the second level.
Its layered in the third level as well as the second.
The criminal element has to be addressed through the justice system.
The Second through mental healthcare and BTW, the present private/contracted mental heathcare system is extremely corrupt. That is why we quit.
Just look at the cost to house a inmate in the system these days. So, we want to make all homeless criminal?
Follow Finlands example.