Of course! Dictionaries are another data structure you can use. You can read about them here: docs.godotengine.org/en/stable/cl...
It's a way you can consolidate your data.
You can loop through the keys in a dictionary like you do an array too! Lmk if you have any more questions!