You would have to ask in the Acrobat Forms forum.
Off the top of my head:
In InDesign you can get/set the name of a button...
...and export your data to a text file where each record (line) contains two/three/etc. fields: button name, trigger and the code for your custom action.
In Acrobat, you can read the data from the file converting them to array in which every element is two/three/etc. elements array: button name, trigger and the code. Then you can loop through each element getting buttons with getField method...
...end setting the action, like so:
The button with new action attached: