Not sure how you can capture global variales such as $__timeFilter
BUt you can capture your own variables
import "array"
filter = "$boojie"
a = [
"1",
"2",
"3",
"4",
filter,
]
b = a |> array.map(fn: (x) => ({_value: x}))
array.from(rows: b)