Implement Array#toJsArray method