1963, Community Mental Health Act: JFK moves money away from large institutions, and into "community-based" programs. (In other words, the fed govt promised money for the latter, and thus states didn't invest in the former).
He hoped to reduce the institutional population by 50% (no idea why this was the goal, but FBOW it was). In fact, unlike many govt ideas, this (way) "overachieved". By 1980 it had decreased 75%, in 2000 by 90% (from over 500000 to 55000, taking no account into base population increases along the way, as a percentage).
So in other words, there's about a million people (adjusting for population growth) who would be institutionalized, if it were not for JFK's initiative. That's not exactly what you see on the streets (the population numbers are a dynamic, not a constant), but it's some sort of first approximation.
A noteworthy side effect was these "large institutions" (physically big buildings) being "repurposed" by local govts basically as a money-making operation (land usage in particular).
By 1977 for instance, only 650 of these "community health" centers had been built, and they served almost 2 million persons, but weren't designed for the more difficult mental health patients (those previously institutionalized). Jimmy Carter got the Mental Health Systems Act passed in 1980 with some new money, but in 1981 the omnibus passed by Congress "repealed" this to some extent, and instead made block grants to states that effectively only had mental health aspects as competing with other moneypots (food banks, housing, etc.).
Also, don't forget those imprisoned, for which the estimates are about 15% (around 300000) of them have serious mental illness (compare this to 100000 psychiatric beds in hospitals nationwide).
But yeah, CA has felt the worst of it, from both bad policies at various levels, and funding first going into inapropos "community health" centers, and then even that drying up. Almost a case lesson in how federal initiative crowds out state incentives, and local poobahs ending up with all the goodies themselves.