Persons with an intellectual disability or a developmental disability or who are senile or impaired by alcoholism or drug abuse shall not be detained judicially under this chapter, unless they are also mentally ill and as a result present likelihood of serious harm to themselves or to others. Such persons may, however, be committed upon court order under this chapter and the provisions of chapter 475 relating to incapacitated persons, pursuant to chapter 211 relating to juveniles, or may be admitted as voluntary patients under section 632.105 or 632.120.