Array search and indexing

I'm learning how to manipulate NBT. My obstacle right now is figuring out how to dynamically index and array using the player's UUID. I can store a player's UUID in 4 separate scoreboards just fine. The question now is, how can I use that information to find a specific element from an array, which also has the player's UUID stored.
Continue to help post