I would do it before because then you would have a spare HD incase the upgraed fails.
PS after doing the RAID install, disconnet the new HD and save it untill the 4.0 works and then put it back in and complete the RAID install by letting it copy to the new HD.
This is a Signature and not part of the answer, it appears on every reply.
This is an Analogy so don't take it personally as some have.
Why change the engine if all you need is to change the spark plugs.