[js] 'array' module (splited of from v8 code)