What is the purpose of prison? Should it just deprive liberty? Should it be a brutal place? Should it vary depending on the severity of the crime?

Should juveniles be put in adult prison?

Came across this report after watching a film called Animal Factory:

Report on Rape in US Prisons

Should 16 year olds who have committed minor offences be frequently raped? What duty of care does the prison system owe prisoners?