Faster way of pushing a single element onto an array