Ejecta blankets around craters on a km-scale show stark differences in the ejecta mobility (maximal extent of ejecta divided by the crater radius) with latitude and types of plains on Mars, which has been known for a long time (Barlow and Pollak, 2002; Li et al., 2015) but is not well-understood. Our main goal is to explore the idea that the subsurface rheology drives ejecta dynamics and leaves characteristic, observable imprints in the spatial distributions of ejecta. We conduct numerical simulations of impact cratering into a variety of subsurface models and study the impact of varied subsurface material (porous basalt, water ice, water), as well as structure and layering on impact sites and properties of impact ejecta. Our models consider variations in the depth of water or ice covering basalt; the thickness of buried ice; and the depth of burial of ice. We find that ejection angles and velocities depend on these quantities and configurations, e.g. velocities decrease and angles of ejection increase with increasing water layer thickness, buried ice thickness, or thickness of basaltic debris over an ice sheet. As a result, several ejecta characteristics derived from ejecta thickness profiles carry information about the underlying rheology. Specifically, the ejecta mobility, as well as the radial position of the maximum and the slope of the ejecta thickness profiles are diagnostic. The power-law function of the thickness profile of the ejecta blanket right after formation is a good indicator of ejecta from water- or ice-covered targets but not from more complex multi-layered structures, hence we caution against using scaling relations to describe ejecta from such targets. As any surface water/ice volatile mass is unstable on Mars, we also consider the geomorphology of craters and ejecta after the loss of volatiles. Our main findings include the observation that after the loss of surface volatiles, craters which formed in water-covered targets would appear shallower than those formed in basalt. The ejecta mobilities observed today would also be smaller if craters formed in volatile-covered targets than in basalt. Our findings can aid the interpretation of data returned from cameras onboard multiple spacecraft orbiting Mars such as HiRISE, CaSSIS, or CTX, and constitute a proof of concept of the hypothesis that information on the subsurface, including where ice is or was present, is encoded in the ejecta profile and spatial distribution.