const groups = {
A: ['a', 'a', 'a',],
B: ['b', 'b', 'b', 'b',],
C: ['c', 'c', 'c', 'c', 'c', 'c',],
};
const longest = Math.max.apply(null, Object.values(groups).map(a => a.length));
const sortMe = [];
for (let p in groups) {
const values = groups[p];
const step = longest / values.length; // 1 and bigger
values.forEach((v, i) => sortMe.push({w: i * step, v: v}));
}
sortMe.sort((a, b) => a.w - b.w);
const result = sortMe.map(el => el.v);
console.log(result);
// ["a", "b", "c", "c", "b", "a", "c", "b", "c", "a", "c", "b", "c"]