No mentally ill person under the age of sixteen years shall be regularly confined in any ward in any state hospital which ward is designed and operated for the care of the mentally ill eighteen years of age or over. No person of the ages of sixteen and seventeen shall be placed in any such ward, when in the opinion of the superintendent such placement would be detrimental to the mental condition of such a person or would impede his or her recovery or treatment.