added support for array notation as in Velocity 1.7

The support is for arrays like $arr[0] or $arr[$index]