Expose Java arrays inside ScopedPrimitiveArrays.

This makes writing SetObjectField() code easier.

(cherry-pick of 74adde45e60587a41d7ec8ed59f247f7c33ac6ac.)

Change-Id: Ia64d58748ce721cbdc89742c020edd22dbb694b0