Instead of iterating through each element in a matrix and checking if random() returns lower than the rate of mutation, does it work if you generate a certain amount of random indices that match the rate of mutation or is there some other method?
Yes. 
Suppose your gene length is 100 and your mutation rate is 0.1, then picking 100*0.1=10 random indices and mutating them is faster than generating & checking 100 numbers.
Mutation algorithm efficiency