Fix types ArrayRef duplication
Fix compare test duplication in test_types