In-place map of vector functions across slices of multidimensional arrays

If you are working with 3-component arrays representing position vectors in space (so that you have lots of operations on small arrays of length 3), then I would strongly consider using StaticArrays.

In your example you would just have 1d arrays of SVectors and could use ordinary broadcasting:

julia> using StaticArrays, LinearAlgebra

julia> A, B, C = rand(SVector{3,Float64}, 4), rand(SVector{3,Float64}, 4), rand(SVector{3,Float64}, 4);

julia> A .= B .× C
4-element Vector{SVector{3, Float64}}:
 [0.10928103138317774, -0.01855287736466356, -0.023819251068657343]
 [0.16095133726726152, 0.34506454774262896, -0.2178141205786981]
 [-0.453417349873811, 0.34516082042036367, 0.2587571993077106]
 [0.5297917349791741, -0.2985033529890534, -0.3202434018984674]

In general, StaticArrays (or similar) are by far the most efficient and convenient way to work with physical coordinate vectors.

2 Likes