There are some internal functions.
$fields = acf_get_fields($group_key);
will get all the fields in a field group, you can loop through the entire group.
$field = acf_get_field($field_key);
will get a specific field, you can then look in $field['layouts'][$layout_key]['sub_fields'];
I don’t think that there is a function for getting a field’s sub fields.