arrayify implementation