Refine proto.js

* Improve Array#and() & Array#times()
* Add Array#reperm() and Array#flatten(), and use those