Hey ! I was wondering if there was an efficient if given an array

a = [x_1,...,x_i]

to get a matrix that is given by

M = [[x_1-x_1,x_2-x_1,...,x_i - x_1],[x_1-x_2,x_2-x_2,...,x_i - x_2] ,etc.]

The only thing I have in my mind is

t_array = [x1,x2,x3,etc]
a = Array{Array}(undef, 1, length(t_array))
for i in 1:length(t_array)
a[i] = t_array[:] .- t_array[i]
end
Is there a package of any use that could be used ??