Section 66. Except as otherwise provided in section sixty-seven and in section twelve of chapter one hundred and twenty, no child under 18 years of age shall be detained by the police in a lockup, police station or house of detention pending arraignment, examination or trial by the court. No child under 18 years of age shall be committed by the court to a jail or house of correction or to the state farm, pending further examination or trial by the court or pending any continuance of his case or, except as otherwise provided in sections fifty-two through eighty-four upon adjudication as a youthful offender.