I thought you could add to a datagroup with lappend, but the change couldn't be saved to file and wouldn't be persisted through a reload of the configuration. I don't remember the exact details from the last time this came up and couldn't find the post I was thinking of.
nmenant's right though, an array would be better to handle this. The downside is that if the config is reloaded or a new unit goes active, the existing data would be lost.
If you need to make permanent changes to a datagroup, you'd need to use an iControl app to do this. It might be tricky though trying to take data generated from an iRule and use that as input for an iControl script.
Aaron