A simple function
auto f = [] (const array <GLfloat, 4> a, array <GLfloat, 4> b) {b [2] = a [2] + 5;};
does not work as expected - array b remains unchanged.
Because you're passing by value and simply modifying the copied array, which has nothing to do with the outer b. You have to pass by reference:
auto f = [](const array<GLfloat, 4>& a, array<GLfloat, 4>& b) {b[2] = a[2] + 5;};
^^^^
You should pass a by reference-to-const as well, to avoid the unnecessary copy.