Refactoring of parse_fields_array method