Add native to-/fromJSArray

Needed by #597