3900(x)'s are typically the best value for mining monero, occasionally 3600(x)'s or 3950x. The rest of the system can be built for almost as cheap as you can get except for some exceptions. Good ram (samsung b-die is popular) can be worth searching ebay for, especially with the higher end cpus since it will impact a larger hashrate. Be careful going too cheap with the motherboard, some motherboards perform quite a bit worse or don't have quality components to support the high power cpu's and will break (speaking from several instances of experience). You may want to invest in more efficient power supplies like gold rated to save on electric. You can use a flash drive for storage as it doesn't impact hashrate.
If you want to generate heat, go for higher voltage overclocks (you will need larger coolers to disperse the heat).