In practice I think giving a stipend to buy shelter is less useful than providing shelter directly in our current political system where large amounts of local regulatory control have been captured by existing landowners — so more money in doesn't mean more production of housing. For example, it's illegal to build significant new housing in most of San Francisco, and NYC zoning and planning restrictions mean that the city has built less housing in the past decade than it built during the Great Depression, despite vastly more money being spent.
There's also the tough tradeoff that money is useful for more than just food and shelter, and so there's high incentive for unscrupulous people to try to get you to transfer it to them instead of covering your basic needs: for example, by spending millions on advertising campaigns to get you to stretch yourself to buy things you don't need; or just regular, transparently illegal things like extortion, selling addictive drugs, etc. It's not that people are dumb, it's that other people have incentive to try to get you to do things that are bad for you but good for them, if you have money. If you have shelter that can't be transferred, there's just a lot less incentive to try to abuse you.
Not that money is bad, just if we're trying to run an efficient program that covers basic needs (but not much else), directly providing the things we want to provide is IMO likely to be more efficient than cash transfers and unaccountably hoping that the cash is spent on what the package is aiming to provide.