hi,
sorry that i didn't pick up right away on the subtlety here, of it having to do with SwiftUI code -- although it was posted in SwiftUI (duh!) and does mention something about a data source.
on the Swift side, you can certainly do a forEach() instead of an explicit for loop:
array.enumerated().forEach( { print($0.0,$0.1) } )
this will give the same output as what i showed above. can't say where this leads in SwiftUI and a data source, since i haven't gotten to SwiftUI yet (but maybe next month!)
good luck (and apologies for giving a simple answer to a question other than what was asked),
DMG
EDIT: the following code might be more clear for readability than what was above:
array.enumerated().forEach( { (index,item) in print(index,item) } )