You obviously worked in an institution, as did I for a few years. We employed four Social Workers to evaluate inmates detained, before trial, and to provide counseling to those placed on probation and serving time in our county jail.
Schizophrenia is common among many committed for short terms for misdemeanor convictions, and mostly represented by overworked public defenders who no longer represented their client after their conviction (that has recently changed, since my retirement).
Thus the Social Workers and the assigned Probation Officer worked together to find adult group homes for those with no family or no family member who they have not alienated. When a placement was found a removal order was requested and probation was modified giving credit for time served in the placement.