IRF530 getting very hot
How come this is happening? I am above the threshold voltage of 4V, so I assume the FET is not in a linear state


The FET datasheet specifies RdsON for Vgs=10V. It is not specified for 5V. Therefore it will not conduct fully and act as a resistor. Threshold voltage is the Vgs at which is begins to conduct just a little bit, you need way more to have good switching.

Solution: use a FET with RdsON specified for Vgs=5V, and suitably low RdsON. For 6A and without heatsink, aim for 15 mOhms or lower. There are plenty of such FETs.