Вы можете создать
struct Item {
let title:String
let arr:[String]
}
Тогда
let data = [ Item(title:"First",arr: ["Soccer","Golf","Basketball", "AmericanFootball","Baseball","Tennis","Valleyball","Badminton"]) ,
Item(title:"Second",arr: ["Apple","Pear" ,"Strawberry","Avocado","Banana", "Grape","Melon","Orange","Peach", "Kiwi"])
]
Чтобы сделать контент для каждого сегмента
let data : [[Item]] = [ [ Item(title:"Section 1 seg 1",arr: ["Soccer","Golf","Basketball", "AmericanFootball","Baseball","Tennis","Valleyball","Badminton"]) ,
Item(title:"Section 2 seg 1",arr: ["Apple","Pear" ,"Strawberry","Avocado","Banana", "Grape","Melon","Orange","Peach", "Kiwi"])
] ,
[ Item(title:"Section 1 seg 2",arr: ["Soccer","Golf","Basketball", "AmericanFootball","Baseball","Tennis","Valleyball","Badminton"]) ,
Item(title:"Section 2 seg 2",arr: ["Apple","Pear" ,"Strawberry","Avocado","Banana", "Grape","Melon","Orange","Peach", "Kiwi"])
]
]