Better tests of random functions
Update arr.js
Implement initPermanences