arr.map((n, i, a) => a.slice(0, i + 1).join(''))
// или
arr.reduce((acc, n) => (acc.push((acc.at(-1) ?? '') + n), acc), [])
(function xxx(arr, str = '') {
if (str.length === arr.length) {
return [];
}
const newStr = str.concat(arr[str.length]);
return [ newStr, ...xxx(arr, newStr) ];
})(arr)