Not sure about the maximum temp that they get on either of the iMacs, but I can advise that the TJ max on the i5-6600 is 100C, and the i7-6700K is 105C. (Depending on which source, some say the i5 is also 105C.)
But at any rate even if the CPU is getting around 95C it won't do any damage. If it approaches 100C the CPU will throttle to prevent overheating, which naturally will slow down CPU performance but won't shut the computer down.
Which model do you have and what temps do they hit under CPU load?