Yes, the SAE 4-40 thread are what I typically use to mount transistors & ICs to heat sinks. The "#4" is short for 4-40. That's a number 4 diameter and 40 threads per inch. SAE is something like the society for automotive engineers. They standardized nuts and bolts a while back. You could also probably use an M3 screw. That's metric for 3mm diameter.
There are actually a lot of standards out there. Coarse, fine, unified, 80 degree, 100 degree, etc. Then there are the different materials and ratings. Military and aircraft grades, commercial, structural. Who the heck knows what it all means. I just use stainless steel for all of my nuts and bolts. It is relatively non-magnetic, reasonably electrically conductive, very strong, and it don't rust. That's important to me. I like the machines we build to look like new for eons. When your grandkids discover it in the attic fifty years from now, not only is it going to look nice, but it's still going to run when they plug it in.
jh