You can use the "Assign Multiple Tasks" operation from the User service to assign a task to multiple users or groups.
In the Participants section, add a new user list with the list of groups. You can populate the user list dynamically using another process.
This other process can get the list of groups from where ever you want, as long as it returns a list of strings, where the strings refers to the guid for the particular groups.
Jasmin