@rdrtx1: It is better to use SUBSEP to separate the fields in the index of the array.
a[$1,$2,$4,$5]
In the sample they all happen to have the same length, but if they vary in length then one value may "blur" into another value and create unexpected results
Here is a possibility. Instead of going through machinations with complex scripts, improve the file format first. The "Category of XXX", etc. information is redundant, already in field #3. "Category of XXX" is extraneous, and hard to deal with. I know you didn't ask for different file format! But I think this is better solution to making file easier to deal with. Suggested new data file format: