You can try this, you have to create an array of labels or a collection of labels.
func assignLabel(){
if yourArray.count > labelsArrays.count {
yourArray.removeFirst()
}
for i in 0..<yourArray.count {
labelsArrays[i].text = yourArray[i]
}
}
solved How to change multiple labels one at a time? – Swift