.chm files contain files within them therefore they should always be scanned.
.jpg is scanned by default by most antivirus apps since they can be used to infect/exploit a system.
.gif I don't know if it can cause an infection/exploit or not.
Scanning any archive format (.rar, .zip, .cab, etc.,) is up to you as the scanner will only be able to detect infected files within the archive but won't be able to disinfect the file inside the archive. You have to be careful what you tell a scanner to do with an archive that has an infection in it because it will result into the whole archive being deleted or quarantined since files inside archives can't be cleaned.
A general rule of thumb with archives is once they're scanned there isn't a need to keep re-scanning them with each antivirus scan since they are most likely not going to change and most notably it wastes a significant amount of time to scan them each time. However any newly downloaded software or files that are stored within an archive should be scanned.
I personally have my installed antivirus configured to ignore some old archives (
see screenshot) that are rather huge and extremely slow to scan since I know they won't change, e.g.; I tell my av to ignore the .cab archives in the MS Office Cache and the .rar archive backups from my old computer.
With that said there was an exploit sometime ago that would inject viral code into .rar archives - I haven't followed the incident so I don't know what the outcome was.