Jiri,
Each interface on the device would need to be parsed, looking for the existence of the command "ip-helper" if the command was present, two new ip-helpers need to be added to that interface. If the command is not present, the interface is skipped and the next would be examined. I suppose one way to look for it would be any interface that has an IP address assigned would be looked at. If an IP address was there, then check for helpers.
-Steve