The thought of fining or even jailing the homeless just for being homeless scares me. It's a more like criminalizing the poor and it would be a total waste of taxpayers money.
A more humane treatment of the homeless is also a benefit to the tax payer.
If housing the homeless in prisons is cheap, then a program where they can come and go from a prison but otherwise use it as a sanctuary would not be bad. If we are talking about treating the unhoused as criminals then that's where I take issue.
People's problem isn't with the homeless in general, it's with the mentally ill and/or drug addicted ones that shit on public transit/street corners and accost strangers and turn public parks into open air heroin dens. Free housing won't help this sort of homeless.
The people you mention are a tiny visible minority.