how would you ensure the mentally ill are placed in appropriate facility?

As I understand the problem, the mentally ill can only be placed in institutions if they are a clear danger to themselves or others.

The health care worker assigned to a mentally ill person's case needs to be sure that the person has a recent psychiatric or psychological exam. Then a team of professionals determines whether a group home or independent living with supervision or an institution is the appropriate placement.