For sure the problem is not on tapGesture or animation but the access to the array element.
Focus is on valori[x]
So, everywhere you want to access valori[i], make the test:
if i < valori.count { valori[i] += 100 }
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: