Local arrays in for loops

Looking at error messages, I’ve come to a cleaner idea without ntuple:

function temp1d(vertexList,elements)
  L = elementLength = size(elements[1],1)
  v=SVector{L}(1:L) # type magically gets properly inferred
  vNext = v .% elementLength .+ 1
  randvec = SA_F64[1,2,3]
  acc = zero(eltype(vertexList))
  for k in 1:size(elements,1)
    vertices = vertexList[elements[k]];
    edges = vertices[vNext]-vertices[v];
    edgesNorm = norm.(edges);
    foo = map(x -> dot(x, randvec), edges)
    acc += foo
  end
  acc
end