You may use either t-sne,PCA to visualize each image. But the visualization bit more different than your image. As it depends on what network you are training for MNIST dataset. If you train an autoencoder then pass the dataset to get the latent vectors then plot then you might see bit more structure.
PFB link for generic visualization of MNIST

  
      
      Medium – 19 Sep 19
  
  
    

Principal component analysis(PCA) with code on MNIST dataset 151

PCA explained using examples and implemented on the MNIST dataset. We also explore the drawbacks of PCA and where it can’t be used.

  Reading time: 4 min read