const fn = length => Array.from({length}, (v,k) => ({id: ++k, green: false, red: false, blue: false })); console.log(fn(25))