What are the monthly costs of various ways of dealing with the severely mentally ill

It is my understanding when a seriously mentally ill person becomes homeless it is cheaper to give them an apartment than to leave them on the streets due to higher medical and police expenses of the latter. People in an apartment have fewer er visits or run in with police.

But I believe mental hospitals are even more expensive than either option. What are the costs per month of various interventions?

Let them be homeless
give them homes
Put them in mental hospitals
put them in outpatient facilities or group homes
offer subsides to family to take care of them
keep them in prison or jail

In southern California we have a facility that looks like it may have one time been military housing of some kind. Small apt buildings with 4 apts per building. I believe they allow 2 residents per apt. They have a couple of 24 hour guards on duty and a small office. I would guess about 300 are housed here. The residents seem very happy and it allows them some dignity and privacy as well. Not sure of the cost but I like the plan.