Support indexed arrays in "path" spec.

“path” can include indexed array references in ValuesForPath() and
NewMap() - i.e., “doc.books.book[1].author”.