UHT uses a UProperty::ArrayDim state of ‘2’ during parsing to mean ‘this property is a C array’ (and ‘1’ to mean ‘TArray’ and ‘0’ to mean ‘not an array’). It does not hold the actual array dimension because UHT is not an intelligent enough C++ parser to work it out in all cases.
During code generation, ‘2’ is then translated into a CPP_ARRAY_DIM() at code generation, and then the C++ compiler works out the correct value for us, as it can harness the full power of C++ parsing.
Really, this variable should be an enum. It was originally migrated from code which did attempt to parse the array dimensions, but it failed for C arrays that had anything other than a literal dimension or an enumerator in a UEnum.