Unmounting (filesystems) is not sufficient.
You'd have to stop the array then re-assemble it afterwards:
mdadm --stop /dev/md0
# re-arrange / hotplug drives
mdadm --stop /dev/md0 # (*)
mdadm --assemble /dev/md0
It makes sense to check journalctl / dmesg, and/or cat /proc/partitions / lsblk, to make sure the drives got re-detected fine before attempting to assemble it.
(*) On many modern Linux systems, there is some md auto assembly magic going on in udev (/usr/lib/udev/rules.d/*md-raid*.rules) so you might end up with a stale /dev/md0 if you only hotplug a single drive.
In that case you actually have to stop it again before assembling — or re-trigger udev rules for drives that didn't get hotplugged, or use mdadm's incremental assembly commands to complete it, but stopping it a 2nd time is simpler, so that's why mdadm --stop is used twice both before and after hotplugging a drive.
In some cases mdadm.conf is too verbose and restricts the devices or lists individual drives for each array. This can prevent successful assembly, so if there are still problems, it would be the next place to check. Keep your mdadm.conf as simple as possible (it really only needs to know the UUID for each array).
If you have extra drives available, and don't mind resyncing the array, you can do the whole process online, w/o losing redundancy using mdadm --replace mechanism. This way you could swap slots without unmounting or stopping anything.