This is kind of a silly, over-complicated way of doing it, but it works:
var doubled_array = (func(amt=5, a=): for n in range(amt): a.append(n * 2); if n + 1 == amt: return a).call()
The Python equivalent would be:
doubled_list = [n * 2 for n in range(5)]
At that point, you're better off just making a regular for loop with a previously initialized empty array like edupo suggested.