All you'd need to do is call this jdapi class for every form before you compile them. You could of course add informations as you need them. Call your procedure which populates the array e.g. in the PRE-FORM trigger, and you can reference your window names everywhere you want.
constants.arWindows(0) := 'WINDOW0'; constants.arWindows(1) := 'W_EDIT0';