Yes, a bit tricky. You don't need to declare arrays in AWK, amazingly. Interesting how long it takes to get ergonomic gestures just right in languages.
https://www.gnu.org/software/gawk/manual/html_node/Array-Exa...
https://www.gnu.org/software/gawk/manual/html_node/Array-Exa...
Is this a five dimensional array? How does it get populated?
EDIT: I see it now in the code. Excellent!