If I understand what you're saying correctly, you're trying to switch between AHCI and RAID. This usually ends badly, as what most people try to do is essentially dramatically change the disk controller that the Windows boot device uses. When Windows tries to boot after the change, you get a prompt BSOD because what's in the registry about the storage controller is completely wrong.
Instead, have the system on AHCI, enable the Marvell controller, boot, install the Marvell controller in Windows, reboot, make sure the Marvell controller is recognised by Windows, reboot again, switch the boot device (the SSD) to the Marvell controller's ports, boot again, hopefully it works, then try switching the Intel ports to RAID, boot again, it hopefully still boots, then reboot and set up the RAID array.
This method should give Windows the information it needs to auto-detect what's necessary to boot properly. I'm not sure whether you'll be able to switch the SSD back to the Intel ports after that and still get Windows to boot, but it might. If you want to try that, I would try it but with only the SSD connected and Windows will hopefully figure it out. In this scenario, when the SSD is connected into the RAID system (even if it isn't in a RAID array per se), Windows will recognise it as a different type of disk I think, and it might not like that.