r[[## & @@ pos[[1]]]] = vals[[1]];
r
{{100, 3, 4}, {3, 4, 5}, {4, 5, 6}}
r = Array[Plus, {3, 3}];
Do[r[[## & @@ pos[[i]]]] = vals[[i]], {i, 2}];
r
{{100, 3, 4}, {3, 200, 5}, {4, 5, 6}}
Additional methods:
r = Array[Plus, {3, 3}];
MapThread[(r[[## & @@ #]] = #2) &, {pos, vals}];
r
{{100, 3, 4}, {3, 200, 5}, {4, 5, 6}}
r = Array[Plus, {3, 3}];
(r[[#, #2]] = #3) & @@@ (Flatten /@ Transpose[{pos, vals}]);
r
{{100, 3, 4}, {3, 200, 5}, {4, 5, 6}}
r = Array[Plus, {3, 3}];
r = SubsetMap[vals &, r, pos];
r
{{100, 3, 4}, {3, 200, 5}, {4, 5, 6}}
r = Array[Plus, {3, 3}];
r = MapAt[Last[vals = RotateLeft[vals]] &, pos] @ r;
r
{{100, 3, 4}, {3, 200, 5}, {4, 5, 6}}