Grid of all elements of an arbitrarily sized matrix

I guess you want something along the lines of

julia> Iterators.product(A[:, 1], A[:, 2]) |> collect
4×4 Matrix{Tuple{Int64, Int64}}:
 (1, 5)  (1, 6)  (1, 7)  (1, 8)
 (2, 5)  (2, 6)  (2, 7)  (2, 8)
 (3, 5)  (3, 6)  (3, 7)  (3, 8)
 (4, 5)  (4, 6)  (4, 7)  (4, 8)

Tweak shape etc. as needed.