Correct handling of array types in TMetaUtils::GetUnderlyingType.

Commit 6cb16e4d279 introduced a loop but the code handling the array was not
properly updated (was still using the type as it was before entering the loop).
Fix template parameters and data members of (Subst)TemplateParmTypeType.