generate_packets.py: Move field declarations into type code
Part of #45206. Make Field.get_declar() a wrapper around a call to a FieldType.get_code_declaration() method, which constructs array declarations recursively.
Part of #45206. Make Field.get_declar() a wrapper around a call to a FieldType.get_code_declaration() method, which constructs array declarations recursively.