You can get all ACF field groups by using the function acf_get_field_groups()
You can get all of the fields in a group by using the function acf_get_fields($field_group_key)
Getting all of the groups on a specific post type you’d need to loop through the field groups and look at the location rules.