encode Struct fieldAtIndex() and fieldIndexAtOffset() methods