Moodle will let you break your class into groups for collaborative work. These groups can then be used for discussion forums, Moodle assignments, and other activities.
If you plan to have different sets of student groups for different activities, and to use the gradebook, you’ll need to also set up groupings of groups. UMass Amherst has instructions for creating Groupings.