Следующая функция должна делать то, что вы хотите:
ClearAll[applyToAll];
applyToAll[f_, list_List, n_Integer] :=
applyToAll[x_ :> f[x], list, n];
applyToAll[rule : (_Rule | _RuleDelayed), list_List, n_Integer] :=
Replace[
list, {left : Repeated[_, {n - 1}], el_, rest___} :>
{left, el /. rule, rest}, {1}];
и может принять правила. Например:
In[192]:=
applyToAll[ToString, {{1,2},2,{3,4,5}},1]//InputForm
Out[192]//InputForm= {{"1", 2}, 2, {"3", 4, 5}}
In[193]:= applyToAll[ToString,{{0},{1,2},{3,4,5},{6,7,9,10}},2]//InputForm
Out[193]//InputForm= {{0}, {1, "2"}, {3, "4", 5}, {6, "7", 9, 10}}
In[194]:= applyToAll[x_?OddQ:>ToString[x],{{0},{1,2},{3,4,5},{6,7,9,10}},2]//InputForm
Out[194]//InputForm= {{0}, {1, 2}, {3, 4, 5}, {6, "7", 9, 10}}