You can directly use the second array as an index for the first array. Look at this example:
julia> using Random
julia> a = hcat(1:10, shuffle(1:10))
10×2 Array{Int64,2}:
1 7
2 6
3 10
4 1
5 9
6 8
7 4
8 5
9 3
10 2
julia> b = shuffle(1:5)
5-element Array{Int64,1}:
2
5
3
4
1
julia> a[b,2]
5-element Array{Int64,1}:
6
9
10
1
7
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…