The simple answer is you have to make an array of arrays.
But why do you need a matrix for the dijkstra algorithm. As far as I know the Dijkstra algorithm it computes the shortest path in a network of nodes and edges. In Smalltalk you can implement this by a network of nodes and edges. A node has a list of edges with path length. An edge connects two nodes. You can just implement the algorithm over the nodes and edges.