I understand that you have two Photos Libraries, one on a RAID system and one on the internal drive. And you've not had either of these Libraries connected to iCloud in the past-- is all that right?
The internal library has duplicates, but you don't say of what. Do you mean the Mini Library has duplicates in it, or do you mean that the Mini Library duplicates some of the Raid Library? Are these duplicates exact-- same filename, same resolution, same extension, etc?
On a Mac, unlike for an iPhone or iPad, you can have multiple Libraries, as you know. But only one of them can be the System Library that connects to iCloud. The System Library is the one that other apps can access, like for Safari uploads and so on. Without iCloud, you can switch any Library to be the System Library and back. But when connected to iCloud, things get more complicated. Once you decide which Library is the System Library connected to iCloud, switching the "System Library" designation will just begin filling iCloud Photos, and your Libraries, with all the pictures in both. But you can certainly use Photos with different Libraries-- I have about 4 that I switch among regularly, and a bunch of others for special purposes. But the one designated as my System Library is always the same one, my "Favorites" Library.
I'm not sure if you want to do this, but you can merge two Libraries by first designating one as the System Library, and then switching to another. All the pictures from Library #1 will be copied to iCloud Photos. When you switch, all the pictures from the Library #2 will also be copied to iCloud Photos, but Photos will check for exact duplicates as it goes, and not copy those to iCloud. Then, since iCloud Photos now has pictures from both Libraries, it will copy them back to the now connected Library #2, again checking for duplicates. iCloud Photos and Library #2 will be identical. if Library #2 had duplicates in it originally, then those are still there. I have duplicates in my System Library that were there from the beginning.
You do have to decide what each Library is meant to do, and why you need iCloud to do it. Again, iCloud is meant to make a Library available on multiple devices. That's why I have a Favorites Library with only my favorite pictures, because that's all I really want to see and share with my iPad or iPhone. I don't want those 9 less interesting or beautiful copies of the same scene on my iPad.
What do you think?