Generate Array Javascript