For loops are not a valid means of constructing a repeated sequence of views. You'll want to use the SwiftUI view named "ForEach".
https://developer.apple.com/documentation/swiftui/foreach
Topic:
App & System Services
SubTopic:
Core OS
Tags: