[Lint] Replace getAllocatedType with getAllocationSize (#178353)
This now also handles constant array allocations (getAllocationSize
returns total size for constant array allocations, whereas the old code
explicitly excluded isArrayAllocation from linting support).
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>