This is done in moving through the system of keys with ascending number of accidentals in major and minor. You start with 0 accidentals, then practice with 1 sharp, 1 flat, 2 sharps, 2 flats and so on until you reach 7 sharps and 7 flats.
So this thorough approach is very complete and it leads to a full mastery of these chords but it takes a while to go through all these keys with just one chord or its inversion.
Not too many people these days can really focus for a longer period of time on one single task, on one inversion. So another way is faster, and a little less intimidating. Here's how it works:
You learn just one particular inversion in major and minor key with 0 accindentals, then another inversion would be in the keys with 1 sharp, then another in the keys with 1 flat. So you learn different chords and you are going through the same cycle of keys with ascending number of accidentals one pair of major and minor key at a time.
This is much faster approach than to learn all chords in all major and minor keys and still doable for many people (if you aren't in a hurry, and want to learn every chord in every key, then of course, use this complete system - this is how I practice).
Good luck in learning three, four, and five-note chords and their inversions, take action, implement this system into your practice, and you will see how much your organ playing, sight-reading, hymn-playing, analytic skills, harmonization, improvisation, and general musicianship will improve because of this.