The crux of the problem, as I see it, is that in many cases the mental-illness/addiction is too strong and these people vehemently reject actual help even when freely offered.
I'm not advocating "criminalizing homelessness", but am simply pointing out that in practice, "criminalizing homelessness" might be the only workable solution to starting to get these people actual help. Many of these people will reject all actual help unless forced to go through some kind of drug treatment or mental health program.