how do you think group threads work? they don't exist outside the iMessage world at all.
The key is that the recipient list is sent with the message, so the other clients know who else is participating in the group, and can also thread and send outgoing messages accordingly.