Usual IC packages have pins under the level of the top surface, oe also right just under it (pinless) ..... so, placing the metal surface of the heatsink right in contact with the top of the chip, is 99% of the times safe ..... that what you have to check better, is all the rest ..... soldering points that can rise over the level of the chip (for tin excess), components around the chip that can be at the same level, oe a bit higher, than the chip, and so on .....
Basically, if the top of the chip is the higher surface, and there's nothing that can touch the heatsink, a flat surface is ok, and the thermal glue take care about filling the rest of the spaces ..... if you have capacitors or other components that rise over the top of the chip, you need to mill out the parts of the heatsink that go wheere these components are, making sort of "pedestal" that touch the chip and keep the rest over the components .....
An alternative are "silpads", but buying them as news can be difficult and not cheap ..... but some of them can be harvested from old CD and DVD readers and burners (some models have, under the bottom cover, one or more of the chips thermally coupled to the bottom cover, for use it as heatsink ..... sometimes this is done with thermal grease, some other times with various types of silpads ..... worth always the effort to save them, first or after they can become helpful
)