Make sure the destination variable is first declared and second has a variable type of array before you try to output the result. Otherwise the lookup will try to output to an array variable that does not exist, or try to output an array item to a string. Both will throw a type error.
You can do this by using a Set Data Values extension before the lookup table. If your output variable is var11, then in the Set Data Values extension set var11 to JS Code with a value of "" without the quotes. I'm attaching a screenshot after this comment for you to view. I tested this out and it outputs an array of values.