Report on permissions, including granular table access perms

I need to generate a report/summary of access rules. I started working on tables in Metabase DB rather than the UI, possibly making things harder, but I have a list of users, data sources, tables. I cannot locate where granular permissions (table T, group A can View) are stored, can someone point me to docs or table?

permissions, permissions_group and permissions_group_membership tables, and groups and users of course

I am on 1.51.x.

permissions - the schema and content answer question about permissions for collection access.

permissions_group, permissions_group_membership are obvious (roles and role-user map)

metabase_table, metabase_database - map of table/db ids to names

table_privileges - list permissions per table (select | update | insert | delete) but not roles?

data_permissions and collection is I think what I was trying to find, we will see if this has the details.