It is as simple as the command below, it will then update your mdadm.conf or create it in /etc/mdadm.conf
mdadm --detail --brief --scan > /etc/mdadm.conf
mdadm --detail --brief --scan
mdadm, conf, config, fileit, update, etc, scan,