Hi there, you don't need to do anything with the Fusion Drive when you reset or reinstall your iMac, just boot into macOS Recovery Mode for the reinstallation task. '
If you erase your drives separately then you ought to combine your drivers before the reinstallation. Below are the command lines to create a fusion drive:
To find out physical storage volumes:
diskutil list
To create Fusion drive:
diskutil coreStorage create "Macintosh HD” /dev/disk0 /dev/disk1
To create logical volume:
diskutil coreStorage createVolume lvgUUID JHFS+ “Macintosh HD” 100%