The dominant 7th chord has the ability to take all kinds of disonance. You can pretty much play a half step wrong and still get some acceptable sounds in certain situations, but let’s look at a more systematic way to play out on the dominant chord.
The symbol for an C altered chord is: C7(b9, #9, #5), or C7alt. This chord usually resolves to a MINOR one chord, but it can resolve to major with interesting results. This is also the beginning of Purple Haze. Now, those extra numbers show you the alterations, but in an altered chord, EVERYTHING is an alteration. The scale that goes with this chord is know as the diminished whole tone scale, or just the altered scale. In this key, it would be C Db D# E F# G# Bb. Notice it contains the b9: Db, the #9: D#, and the #5: G#. It also has a #4 (or #11): F#. The scale makes a really cool sound, but it’s also a lot of weird notes to look at for beginners.
Let’s say we want to simplify things and use a major pentatonic b6. We have our C7alt chord, and we can just play an Ab (or G#) major pentatonic b6: Ab Bb C Eb E. Notice how this gets a lot of the essentials of what an altered chord is. You get a #5 (Ab or G#), a dominant 7th: Bb, the root: C, a #9 (Eb or D#), and a major third: E. Those notes are all you need to imply a fully altered chord, in fact those are the notes of the Purple Haze chord. Plus you get a cool sound with this scale.
To transpose, look at it like bVI/I. So if you have a D7 chord, you can play major pent b6 off of Bb.