Off the top of my head, here’s how I’d do it:
Use the doc.Items property to get a list of all the items/fields in a doc. For each of the items, check the IsAuthors and IsReaders properties to see if the field is an author field, a reader field, or something non-access related. If it is an author or reader field, then the name(s) in that field have the respective level of access. Add/subtract these from the DB ACL values. HTH.