Handle array and record type mixtures in scope provider