First of all, we should be providing enough of a safety net that no one ever becomes homeless. But given how bad we are at that as a culture...
The fact of the matter is, there are two populations of homeless, and while they are not defined the presence or absence of drug use and mental illness, there is a correlation. These populations are those that will accept housing and shelter, and those that won't.
The former population is easy to deal with. Give them housing until they are able to obtain it on their own.
But what do you do about people who would rather stay on the streets? Let's split this "unwilling" population once more. There are the unwilling that are unobtrusive, don't bother anyone or hurt anything. Not a problem. But what about the unwilling that are a public nuisance? Erratic, violent, etc.?
What, realistically, do you do about them? They won't go, but they can't stay. Define "long-term public support" for a population of people that is dangerous to the public and unwilling not to be. Eventually they will hurt someone or damage property and end up in prison anyway. Should we not address a clear public safety hazard preemptively?
Yes yes, slippery slope. Care will need to be taken, people will fall through the cracks anyway. Every system has cracks, but god knows the current one has big gaping gashes. We are already failing these people. I don't know that incarceration would fail them worse.