You will find that most if not all of the homeless became that way after they became mentally ill and there was no or very little support available for them.
If you want to end homelessness you have to bring back a mental health system that supports the mentally ill, helps them make house payments, and can train them for new jobs when they lose them.
All of these public shootings done by mentally ill people represent less than 1% of the mentally ill population, but the news media takes delight in vilifying the mentally ill as all being violent. This is, of course, not true. But news media makes popular opinion out there. If something is popular, it does not make it true.