Hard Problems In Homelessness
Assume for a minute, that there was unlimited free housing in rural Montana. Anyone who wanted could sign up, and get a very simple modest house in the middle of a rural area, power and water included. How many of the current homeless would go for it? My guess is not many, and quite rationally so: it's actually a pretty bad deal. By going out to the middle of nowhere you lose access to all sorts of other civil services (health, education, etc) the people you care about (friends and family), and any number of white/grey/black markets. You end up surrounded almost exclusively by other recently homeless people. In effect those houses in rural Montana are very nice refugee camps. The simple reality is that often being homeless in one place is a better option than having a house in a less desirable one.
Location, Location, Location
The cost of housing is not the cost of building a house. Where that house is has a huge effect on what it costs to build, and what it costs to live in and maintain, as well as what opportunities the house's inhabitants are going to have available to them. Homelessness is comorbid with other issues like health conditions and legal problems. Issues which involve a lot of interaction with the local government. This means that for practical reasons, people who find themselves homeless often need to cluster around the seat of local government. Because of the ways cities grow, these locations are almost always right in the center of the city, which (because of the way cities grow and their low commute times) is typically some of the densest and most highly valued real estate.
Asking the destitute to make long commutes is unrealistic. In many cases even when distant options are available, the destitute will choose homelessness near the services they need to survive, rather than a roof. Often the destitute have a network of friends and family who are able to provide help in the frequent emergencies of poverty. Similarly they frequently need access to markets, both black markets and typical ones, that are able to handle their specific situation. This usually means that they need to be in the same high density areas that their social network live in, or at least able to quickly commute to them.
In short, destitute and homeless people need a lot of the same things that the rest of us want in housing locations.
Housing Prices are Determined by the Market
Almost everyone wants the same locations in urban housing, and like most things in our society we allow people to bid for their position. Though to some extent additional density can be created, allowing for more homes in a desirable location, this is quite expensive. This means that when trying to house the homeless in properties that will actually work well for them, the government/non-profit/philanthropist will be bidding against many of the wealthiest members of society.
Exacerbating this issue is the tendency for housing to be seen as an investment, which both appreciates and provides significant tax incentives. This means that the price competition is not simply for "housing dollars" but also for "investment dollars" as well. Because housing location is partly a positional good any sort of general stipend that is intended to lower the cost of housing, including UBI, Mortgage availability, or housing credits, is likely to simply drive the price of housing proportionally higher.
The Homeless are often unable to maintain a home
Few people choose to be destitute. Often there is some combination of physical, financial, or mental issues which realistically mean that the housing provided is not likely going to be maintained well. In the case of an owner, who we can assume will be a motivated and fastidious occupant, the rule of thumb is that housing maintenance costs about 1% of total home value per year. For those who are neglectful or destructive tenants this can be much much higher.
I have a personal friend who manages real estate professionally. For a few years he managed several Section 8 properties, and was continuously amazed at the amount of damage that they sustained. Doors, both interior and exterior kicked in, holes smashed through walls, plumbing fixtures destroyed with attendant flooding all on a weekly basis.
Housing Segregation is Intentional
In addition to wanting to live near desirable things such as easy commutes, restaurants, and social services people frequently want to live farther away from those they see as low status, or who are a legitimate nuisance. This leads to intense NIMBYism as a great deal of property value can be altered by what sort of neighbors one has. If the word segregation is making you think of racism your spot on, but it also extends to abilism, class, and criminality.
For example, my parents who are in their late 60's have moved into a lovely upper middle class apartment complex. It houses older folks and students of a nearby prestigious university, along with a few families. One of the nice upper middle class families in this apartment complex has a child who, for whatever reason, has some serious problems. He is a meth addict, has rage issues, and steals tens or hundreds of bicycles each year, which he keeps locked to basically every railing in the complex. The police visit frequently, and the noise level at night is unmanageable. The unit directly below his, as well as the one next to his are now continuously vacant despite being priced more than competitively.
Not wanting to live near the destitute is not limited to the middle class. In general the poor, and even the destitute themselves don't want to live around other destitute people. We have a word for communities intentionally and primarily comprised of poor people : ghettos. Ghettos tend to capture their tenants in ongoing cycles of poverty. A dark irony is that large portion of the opportunities that the destitute need in order to climb out of poverty exist in networks that dissolve at when brought into contact with the poor.
Urban boundaries, and influx issues
Homelessness is primarily an urban phenomenon, mostly for the reasons outlined in section one. However, most cities are unable to act effectively outside of their borders for various legal and political reasons. This means that almost any housing option needs to occur within the city boundaries itself. Conversely, a small but significant portion of the homeless are willing to relocate between cities. Any homeless person who comes to a city is now part of that cities homelessness problem. This means that any single city that provides particularly good services or housing solutions is going to become a magnet for a percentage of the national homeless population. This problem is exacerbated by many cities actively bussing their homeless to other cities in order to make them a different metropolisis problem.
In the direction of solutions
These are all hard problems, but not impossible ones. In many cases, the problems in homeless are difficult to resolve without solving a large number of other societal issues that run quite deep. In each of the cases above the very simple solution of "buy houses for the homeless" has some factor that makes it prohibitively expensive or ineffective.
So what might help? Free high quality public transportation for all is probably one of the better plans. The benefits of this overlap with a lot of other solutions, but, in general, create easier commuting for those who can't afford cars. This allows more, and more affordable housing to be an option for them. Along a similar note, adding express lines from housing projects to the seat of local government.
Increasing the general stock of housing, often dramatically, is another extremely helpful plan. This means all housing, not just low income housing. Ideally you are looking for policies that subsidise, or remove barriers to housing construction, not for policies that provide money for housing purchase, (such as the mortgage loan programs) which simply drive housing prices up. Hopefully this would lower cost of housing, and allow for housing programs to stretch their dollars further.
Largely though, homelessness is a holistic problem, and is probably better viewed as a symptom of a number of other societal issues, rather than a specific problem in and of itself.