"(c) to perform all duties that may be lawfully performed by peace officers in relation to the escort and conveyance of convicts and other persons in custody to or from any courts, places of punishment or confinement, asylums or other places; and" . . . . . . .