Support field name in `fieldoffset` (#58100)
`fieldtype` accepts both the field's name or the field's index. It's
inconsistent that `fieldoffset` only accepts the field's index, but not
its name.
This commit adds support to `fieldoffset` for the field's name,
documents and tests it.
---------
Co-authored-by: Alex Arslan <ararslan@comcast.net>
Co-authored-by: Lilith Orion Hafner <lilithhafner@gmail.com>