build matrix from arr, show  path