You are right, that armed officers will not be able to solve the homeless issue.

However, armed officers get beaten up far less, than unarmed officers.

In NYC, I watched unarmed officers getting beaten up, on a weekly basis.