Well, I got so busy I could not create an example along the lines I was thinking. So I did it when I got home.
In my example, the tags are internal. If they were assigned to a PLC, I am not sure how that would work with Logix5K tag arrays... It might be as simple as setting the data source of the array tags to the first element of the PLC array.
In any case, in this example the HOA pop up is called by a function which receives the index passed from tag "x". On the HOA Popup, the indice "x" is used to allow the buttons to each write to the HOA_CMD[x] value. I could have used two lines of code per device instead of a function call, but wanted that detail in there in case it gives you an idea of a better or cleaner way to solve your problem. A function is just a program that can receive input parameters.
There is a separate program running "on tick" that copies the HOA_CMD to the HOA_IND array one element per second to simulate what might happen in a PLC. It is a little slow to go around the loop, but that is okay and somewhat helpful for me to test it.
I don't know if the example will give you some ideas how to make your situation work without having to have so much complex code, and with bit tags, but it might spawn some ideas. I am using values for states, but with very little work, you could either make those values match the bit patterns you wish to control or probably change the tags to bit level tags to avoid the possibility of changing bits in your overlay that must be untouched.
I have no idea why the graphic images I chose are garbled in the emulator. This happened to me last week on a project at work and Red Lion Tech support blamed in on the 64 bit OS. "The emulator is not supported on 64 bit machines." they tell me, assuring me that the stuff will look right on the real hardware. Well this machine at home is 32 bit and does the same thing...
So ignore the twisted motors and funky buttons if it does that to you...