As I understand it, the closest equivalent of this in Julia is currently to declare a type like:
mutable struct WrapArray{T,N} <: AbstractArray{T,N}
a::Array{T,N}
end
that wraps around an array a. You would then have to define size, getindex, etcetera methods on WrapArray (which simply pass through and call the same methods on the field a), so that it acts like an array.
Then you could define:
function swap!(x::WrapArray{T,N}, y::WrapArray{T,N}) where {T,N}
x.a, y.a = y.a, x.a
return x, y
end
Since this is a mutable type, the changes to the contents of x and y would be reflected in all references to those objects elsewhere. As you point out, above, though, this adds an extra indirection to array accesses.