I wouldn't start by saying that the US prison system takes care of any inmate's needs, even if they spend a fabulously large amount of money seemingly earmarked for that task.
Long term, permanent housing is always going to beat incarceration, when we're talking about the same population. It might cost more at first, but those costs are overwhelmingly fixed and then much smaller future variables. The variables that aren't covered (food, medical care, etc., as you've correctly observed) can often be transferred from carceral programs. Fewer people in prisons also means less money spent on maintaining the physical and human plant; some 20% of the individual costs listed above.
Assuming a $700k unit has an estimated lifespan of 50 years. That's $14k/year, we could say $20k/year with a generous maintenance allowance over the life of the home.
So in this example that's $80k/yr remaining for food, utilities, care, etc.
Those $700k units that LA built will also require constant repairs, and the inhabitants will still need food, medical care, counseling, etc.