Then how does one go about finding such a friend willing to offer such charity? Perhaps it appears easy to you, but a lot of people remain homeless because they lack certain social skills. This could result from autism spectrum disorder, schizophrenia, past abuse, or any of several other conditions.
If they're as disabled as you're describing, they're likely to be eligible for state mental health programs. Staying with family or friends would probably be a better option, but if mental issues or circumstance preclude that, then options are limited. These are the people who couldn't have signed lease papers on their own, anyhow.
No one can rely long-term on staying in shelters because it is too likely that on a given night, there are too many people there.
Shelters aren't meant to be a long-term solution. The mentally ill and physically disabled ought to be provided for by the government. In many countries, they are. In the United States, there is some limited level of help (previously mentioned state institutions). Children that fall into homelessness may be forced to enter the foster system, which sucks, but I don't have a better answer, based on the available options that I know about. Physically and mentally able adults should be able to find some kind of work, and will probably qualify for government assistance, besides that.
And I was assuming that the lack of sit/lie laws in those half-dozen nearby cities would not last forever because those half-dozen nearby cities would want to try to shake that perception.
...
Then how should somebody who is already homeless go about researching which nearby cities both A. lack a sit/lie law and B. are highly unlikely to adopt one in the next twelve months?
Isn't the homeless guy hanging out in the library all day a cliche? Information is more available now than it ever has been, and word of mouth is just as powerful as it ever was.
We don't have a perfect system, and there are "holes" that aren't well-handled. I'd be interested in hearing your thoughts on how to handle homelessness and mental illness, and how we can improve our current system, but I think we've gotten pretty badly off-topic from the statement that you originally made, and which I took exception to:
In cities that have criminalized homelessness, failure to own or rent an enclosed place in which to live lands a person in prison.
I might rephrase my reading of that as "All people who live in cities that criminalize homelessness, and who fail to own or rent shelter, land in prison". I think that I've sufficiently supported my objections to that statement. If you made a weaker claim, like that it "tends to land a person in prison", I probably wouldn't have replied, because I think that's a more reasonable claim, backed up by statistics.
But I think that this isn't even the argument that you're interested in making. I think that the root of the matter is that you're more stuck on the idea of whether sit/lie laws are governmental coercion with the non-choice to sign a rental lease or be thrown in jail, and whether any specific lease entered into under those circumstances could be considered to have been entered into of both parties' free wills. Is that a fair assessment, or have I missed the mark?