Find all occurrences of a given word in a matrix