Pdf Probing Galaxy Evolution By Unveiling The Structure Of Massive Galaxies Across Cosmic Time And In Diverse Environments