function NewArray = NextSetCoords(ScriptVar, frame_i, OldArray)
    % Get the next set of coords for all particles from the previous set of
    % coords
    [TotalParticles, ~] = size(OldArray); % a = Total number of particles
    NewArray = zeros(size(OldArray));
    if ~ScriptVar('Sensing') % If no sensing, matrix multiplication easier
        NewArray = MakeStep_NoSensing(ScriptVar, frame_i, OldArray);
    else
        ParticleOrder = randperm(TotalParticles,TotalParticles); % Pick particles in random order
        parfor i = 1:TotalParticles
            r = OldArray(ParticleOrder(i),:); % Coords from previous step
            particle_index = i;
            [new_values_x, new_values_y] = MakeStep(ScriptVar, frame_i, r(1), r(2),...
                OldArray, particle_index);
            NewArray(i,:) = [new_values_x, new_values_y];
        end
    end
end