Ну, в пару или нет - считайте сами:
import itertools
import numpy as np
many_arrays=[np.array([1,2,3]),np.array([4,5,6]), np.array([7,8,9]) ]
many_arrays2=[np.array([1,2,3]),np.array([4,5,6]), np.array([7,8,9]) ]
prd=itertools.product(many_arrays,many_arrays2)
dists=[]
for it in prd:
dists.append([np.linalg.norm(it[0]-it[1]),it[0],it[1]])
sorted(dists, key=lambda x: x[0])
Результат:
[[0.0, array([1, 2, 3]), array([1, 2, 3])],
[0.0, array([4, 5, 6]), array([4, 5, 6])],
[0.0, array([7, 8, 9]), array([7, 8, 9])],
[5.196152422706632, array([1, 2, 3]), array([4, 5, 6])],
[5.196152422706632, array([4, 5, 6]), array([1, 2, 3])],
[5.196152422706632, array([4, 5, 6]), array([7, 8, 9])],
[5.196152422706632, array([7, 8, 9]), array([4, 5, 6])],
[10.392304845413264, array([1, 2, 3]), array([7, 8, 9])],
[10.392304845413264, array([7, 8, 9]), array([1, 2, 3])]]