ScriptParser: corrected array state tracking.¹

1: This caused input like `[[], 0]` to fail. Because the
open-array state was never disabled, the comma following
the inner close-bracket caused an expected-value error.
test/var/script: added array state tracking test.
test/var/script: changed input expectation to no-throw.