The third series will be set in a Young Offenders Institute and the Doctor Who star will play a prison officer named Bailey.