Generalise prim array Java element types. Fixes #6.