So I learned all the 12 patterns for major scale. Should learn the CAGED system for harmonic and melodic minor scales because there are 4 notes on some strings?
If you wish to incorporate their flavours into your playing and this is how you learned the natural modes then definitely yes. I would use the natural caged patterns you have already learned and just sharpen the one note for the harmonic minor scale - then you only have to learn where this particular note is to know the entire scale. The melodic minor I would learn both the ascending and the descending scales in the same exercise. Finally I would suggest you practice ACTUAL three note per string patterns which will help you glue the boxes together, improve your stretching and string skipping. Remeber to use a metronome as often as you can for extra added ninja skills.
If you want greater fluency in melodic playing, the answer is likely yes because you'll develop a familiarity with common positions for conveniently moving within chords.
I recommend that when you practice them you try to be aware of what part of the scale you're playing -- especially whether you're on the root, fifth, third, and seventh. It's not necessary to call them by those names, but be intellectually aware and also emotionally sensitive to the roles they play within the scale and any chords which may be occurring.
It's worth re-learning the majors, but use the 6th note as a start note, or root. As in, the E major, but from C#. This will reveal the natural minor scale pattern. The only difference between that and the harmonic minor is the raised 7th note. So that can easily be adapted from the natural minor.
Melodic minor is a bit confusing - the classical one rises using the first 5 notes of the minor, then the 6th and 7th of the parallel major. Descending, it uses the natural minor notes. Jazz melodic tends to use the rising notes only, and the same notes descending, if that makes sense!
So, yes, but try to adapt what you already know rather than learn ' a whole new pattern' - 'cos it doesn't have to be seen as such. The same concept works for modes, too.
The typical way the CAGED method is in reference to the to the different shapes of major barre chords and how the major scale corresponds to the chord shapes at those positions. While you can also use this to think in a modal way using the same chords and position based on the patters, it will not work for harmonic minor and melodic minor because they deviate from the major scale pattern. Because of this you will not be able to use the CAGED system in this way as it's not what the CAGED system is for.
There is a minor CAGED system with the same basic idea of the normal CAGED system that you can modify for harmonic and melodic minor and associate those minor chords with each scale patters. If you've already have learned the major CAGED method this should not be too hard to learn.