Sample matrices with replacement (keeping original positions?)

Size is the number of cells in the matrix. 2x2 is 4, 10x10 would be 100