SwiftUI tip: if you use something like "indices" in a ForEach, the view for each item will be identified by the item's index, which is probably not what you want and may cause weirdness in insertion/removal transitions. If you need to use indices in a ForEach, explicitly define the item view's identifier with the "id" modifier. Even then, it may not work in some containers, so use enumerated() or make the index a part of the model itself.
GitHub - pointfreeco/swift-identified-collections: A library of data structures for working with collections of identifiable elements in an ergonomic, performant way.

A library of data structures for working with collections of identifiable elements in an ergonomic, performant way. - GitHub - pointfreeco/swift-identified-collections: A library of data structures...

GitHub

@mbuchetics @_inside Yeah, in our opinion using plain arrays for UI lists of data is eventually always going to cause trouble.

If you ever do async work between fetching an index and updating an element at that index you have a potential race condition that can cause updating the wrong element or even crashing.

Identified arrays should pretty much always be used in SwiftUI and UIKit if there is behavior/side effects in the rows.

@_inside enumerated is not a solution either if you support reordering, I'd say that making the index part of the model is absolutely the right way unless you have completely static data.