Different people are dangerous in different ways. Throwing all such people into one type of confinement facility would not constitute effective inmate management.
Not to mention that those who have been convicted of a crime serve a particular length of sentence. A person who is mentally ill, and dangerous to others, should be held until they cease to be dangerous to others. These are very different situations, and putting mentally ill people in a prison is unnecessarily cruel to a mentally ill person.