Using a second array to temporarily hold values is a pretty straightforward, standard sorting technique.
Alternatively, you can use a while loop, looking for array.indexof(0) to find 0, and delete that index. Keep track of how many 0s get deleted until there are none left, and push back that many times.
Efficiency wise, you probably don't have to worry about it unless you're experiencing noticeable slowdowns.