Added array handling (currently intermingled with tuple term)
Added array test