Mars was hot at the end of accretion. Because of a hot and convecting mantle, the cooling took place rapidly in few hundreds of millions of years. Models shows that the heat flow at that time was about 150 mw/m-2. It is about 5 times lower today. The subsurface temperature is also a function of the latitude. In average, ice/water will be present closer to the surface at high-latitude than at the equayor. Local anomalies, such as (hot spots due to volcanic activity, and/or perched aquifer, glaciers) might modify regionally to locally this distribution.
Source: NASA