My implementation of a for_each function that traverses a std::container by some step size integer N
We could use Container::size_type or std::size_t for the increment_by parameter, or (as standard algorithms like std::for_each_n seem to do) make it a template argument and use the same type while incrementing n.
The standard library algorithms take iterators rather than containers. You mention allowing users to specify an "index location they want to use for their starting position", which would be accomplished by passing an iterator range instead of calling begin and end.
I don't think the default increment_by argument value is useful. If we needed a step size of 1, we'd call std::for_each or use a range-based for loop.
std::for_each returns the function object (which can be helpful for something like summing values). We could do the same.
Follow the standard library conventions with naming template arguments (e.g. name the minimum required iterator type, make it clear that the function is a unary function).




Modified version:

template&lt;class InputIt, class Size, class UnaryFunction&gt;
UnaryFunction for_each_by_n(InputIt begin, InputIt end, Size step, UnaryFunction f) {

    if (step == 0)
        return f;

    while (begin != end)
    {
        f(*begin);

        for (Size n = 0; n != step; ++n)
        {
            if (begin == end)
                return f;

            ++begin;
        }
    }

    return f;
}


(edit: removed unnecessary std::move per Juho's comment).