Looping over different strides in all dimensions and variables