In Pa, once they shut down most of the mental institutions, those patients either became homeless or went to nursin  4054  g homes.  The staff in a typical home is not equipped or educated to deal with mental disorders. It’s a whole different ballgame. And no, they don’t physically separate those who have mental health issues and those who are just old and weak.  Additionally, at least in PA, there are very strict standards for nursing facilities regarding things like chemical and physical restraints, patient rights, freedom to move about the facility freely. So it’s not like a badly behaved or even violent person can be kept away from the rest of the population. The best the staff can do is watch and try to intervene when something happens.