How do I use variables in functions/procedures

how would a 2d array assign each pin(led?) with a number?