const firstArray = [1, 2, 3, 16, 30, 42, 643, 95];
const secondArray = [2, 30, 1, 16, 42, 512, 95];
const thirdArray = [5, 6, 16, 30, 99, 1, 0];
const mergeArray = (...a) => [...new Set([].concat(...a))]
const mergedArray = mergeArray(firstArray, secondArray);
console.dir(mergedArray);
const newArray = mergeArray(firstArray, secondArray, thirdArray);
console.dir(newArray);
Вариант