First and foremost, the idea that people are "cleaning up the streets" by institutionalizing people against their will due to how much paper they have is ethically deplorable. Also criminals should be offered paths to rehabilitation so that they can rejoin society as a healthy member with newly developed social skills rather than just left to their own devices, IMHO.
Secondly, just giving people money doesn't solve the problem of being hungry and homeless for the exact stereotypical reasons you presume. Instead, we should be making it so that the basic needs of living in the USA are not capitalized but are socialized. This doesn't presume ALL things are socialized (though I would support that if a reliable form of that were to emerge). It means that a certain level of food and shelter and all things humans need to survive should be available for free to everyone. This way we reduce the incentive for crime to survive or doing drugs to numb out reality. It doesn't SOLVE those issues entirely of course, that would be absurd to believe, but it does assist with them tangentially as well.
Considering the volume of money to accomplish both of those goals is less than what the US government just approved yearly for ICE, Detention centers, and border facilities - I think it's probably quite capable of financing. In fact, one of the best things Trump has done was to prove we had this money the whole time but that the government refuses to use it properly to help people. That said, now that we KNOW from Trump exposing it that the money isn't an issue - it doesn't make any sense to keep paying for bombs and weapons to harm people when we could be using less money than that to fix homelessness with rent subsidies and cure hunger in the USA, both of which can factually be done with less money than they included in the Trump Tax bill for ICE, border patrol, and detention facilities. This is a mathematical certainty, and I would be absolutely DELIGHTED if you asked me for sources on that.