Check into monastic cultures with mendicant traditions, who were absolutely literate and minded towards archival research. They were not rare, just extremely private and usually secretive to avoid those either in power or led by paranoia who would destroy them.