Handle integer array segment literals

Adds support for array access via segment literals.

```
{{foos.[1].bar}}
```