Index of item in HStack/VStack?

Is there some way of acquiring item index information in HStack and/or VStack? Basically I have this idea of implementing state to keep hold of index of item that was last chosen to make it appear different. I would need the state and action to set the correct index. I could type it individually as hard-coded separate actions but that would seem quite crude.