Widgets- add ability to pack and unpack arrays on JS side.

Fixes https://github.com/ipython/ipython/issues/5020