Refactor out duplication when reading arrays in JXPathContextCutlet.java