My Software RAID 5 has 4 3TB HDDs, now two of them have bad sectors. What is a good way to replace them?

There is not much you can do, other than to rebuild the array one disk at a time. Will the bad sectors affect the restore? Impossible to say. If they overlap with each other, then its possible the RAID wont be able to rebuild all the data. However, if 3 out of the 4 disks have that sector marked as good, then it should be able to recover.