A young offender caught hoarding child abuse images also sexually assaulted a female in Ayr when still a teenager.