Let's say I have this list in an array called 'array':
var Groups = array.GroupBy(i => i);
var Result = Groups.SelectMany(iGroup => iGroup.Take(2)).ToArray();
I'm not sure how to only take what's after the dot into consideration and not the whole item
If the dot is guaranteed to be present, split on the dot, and take the second item:
var Groups = array.GroupBy(i => i.Split('.'));
The rest of your code, with
Take(2), is correct.