In all cases in which orphans or foundling children are placed in any of the orphan homes, whether voluntarily by their parent or parents or guardian or by the order of some competent court or other authority, or whether they come into the care and custody of any such institution as foundlings, the managing board shall have the right to retain the custody of such children until the children are eighteen (18) years of age; provided, that § 71-3-609 applies; and provided further, that such institutions may, within such homes or asylums, provide for such children, or may so provide for them in homes of suitable families outside of such institutions.