Add missing .class function from array types, add some caching