The girl had the mental capacity of a toddler, and her grandma locked her up “to keep control of her,” cops said.