Added some helpers to the pn.js array functions and corresponding tests