Adding items to an array and iterating through them is a fairly elementary matter and if your coding expertise isn't up to that level, I would caution against trying to use code in your form as it may become a maintenance liability later on.
Here at Qdabra we try to discourage using custom code in forms (including in our own internal forms) because of the troubleshooting and maintenance requirements it brings. That's why we developed qRules.
With qRules, you can accomplish this task with a single, simple command:
Delete /xpath=/dfs:myFields/dfs:dataFields/d:SUBMIT_TABLE[@CHKBOX_SELECTION = 1]
I would suggest downloading the trial version and giving it a spin.