It would be great if we could add the following method to `org.modeshape.jcr.value.Property`:

    T[] getValuesAsArray( ValueFactory<T> factory );

Then many of these type-specific cases could be handled by merely finding the appropriate value factory and calling the new method:

    if ( String[].class.equals(type) ) {
        return property().getValuesAsArray(context().getValueFactories().getStringFactory());
    }

This is more compact code and it actually saves us from having to create one Object[] on line 306 above and then create a second array of the correct type. This logic would work for many of the primitive types (e.g., `String`, `long`, `boolean`, `double`, `BigDecimal`, `org.modeshape.jcr.api.Binary`, `DateTime`) but would not work for any cases that don't have a corresponding ValueFactory instance (e.g., `java.util.Date`, `java.util.Calendar`, `Node`, `InputStream`, `NodeIterator`, `javax.jcr.Binary`, etc.).

NOTE: [This method](https://github.com/ModeShape/modeshape/blob/57186db820177428cad691d1222c63a0a3c1d65b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/BinaryStoreValueFactory.java#L106) is not implemented correctly and will have to be fixed to use the size. If the size is greater than 0, it will need to create a `org.modeshape.jcr.api.Binary[]`; this is not the correct type needed below for `javax.jcr.Binary` but it would be correct for the missing case of `org.modeshape.jcr.api.Binary`.