Dumps an ndarray to a binvox stream