generate_packets.py: parse any number of array dimensions
Part of #43927. Explicit parsing of only one or two array sizes is clunky and not easily extensible if more dimensions are supported by other code in the future ~> successively parse arbitrary numbers of array dimensions.
Part of #43927. Explicit parsing of only one or two array sizes is clunky and not easily extensible if more dimensions are supported by other code in the future ~> successively parse arbitrary numbers of array dimensions.