SBM
That would be tricky on constitutional grounds. One of the foundation precepts of the legal system in this country is innocent until proven guilty in a court of law.
Holding someone in jail for the rest of their life without giving them their day in court would definitely violate the constitution. Trying someone who is not competent to assist in their own defence is also unconstitutional. It is a difficult bar to meet people with IQs in the 50s have been found competent to stand trial. A person has to be really, really mentally impaired to be found incompetent to stand trial.
Involuntarily committing someone for treatment of mental illness is illegal if there is no known treatment for the mental illness. There has to be a legitimate therapeutic basis to confine someone involuntarily.
So what could they do with her?
I'm not even convinced she deliberately committed a crime. It sounds like she was very easily influenced; what if someone got her trust and then talked her into bringing the baby out for a visit at a certain time? She was only gone for about 8 minutes, so she didn't have much time to do whatever it was that was done. I think she almost had to have had a co-conspirator or, considering her apparent lack of cognitive functioning, someone who instructed her in some way.
Considering how young little Melissa was when she disappeared, I wonder if there was anyone in the neighbourhood or in the McGuinn's social circle who moved away shortly after Melissa disappeared. Probably not anyone they knew well but someone who had seen Melissa and could find out who her parents were without raising suspicion.