Grouping te text messages, Converting gourplist to array.