If they are committing crimes, they should be imprisoned for an appropriate period of time as a deterrent to crime, a punishment for their actions, and to facilitate rehabilitation (even though evidence shows this doesn't really happen).
If they are mentally ill and unable to care for themselves or pose a threat to the community because of their mental illness, they should be institutionalized and treated. If they are able to be released into the community after a period of time, checks should be performed to ensure compliance with treatment/medication.
If they are mentally ill and unable to care for themselves or pose a threat to the community because of their mental illness, they should be institutionalized and treated. If they are able to be released into the community after a period of time, checks should be performed to ensure compliance with treatment/medication.