From pitches …
A thirteenth chord is principally known as an all bells and whistles dominant which is expected to resolve to its tonic chord a fifth below. It usually turns up as a dominant seventh (say C7) topped off with its relative supertonic minor (which would be Dm) for something in F major. 
If we ignore the key it's in, we see that this chord comprises seven pitches separated by  in sequence  4, 3, 3, 4, 3, 4 semitones. A final 3 semitones would 'round it off' to the top keynote 24 semitones above the root note.
The chord's twooctave path is thus 4334343  of length 7 and sum 24 (for a two octave span). We've got that eighth top note in parentheses to indicate that it's not intended to be included in the chord's 'definition' (the pitch class  of 0  is already included).
Now let's look instead at a Cm13th chord, perhaps resolving to F minor. Its keyindependent twooctave path is 3434343 (see below  again with a parenthesised closing note). 
Finally let's consider a more adventurous Cmajor13#11 chord, with a Lydian flavour imparted by that sharpened 11th. Despite the F#, it can still resolve quite nicely to F. Its keyindependent twooctave path is 4343433 (see below  again with a parenthesised closing note). This time, however, we're colourcoding the notes because we're going to switch things around a bit. 
… to Pitch Class Sets
To construct the pitch class set modelling this particular chord, we drop the second part of the chord (green note heads) by an octave  which essentially turns them into pitch classes alongside the first (red note headed) part. 

We'll now slide the green pitch heads to the left, where we can see that they sit between the red pitch heads, and that none of the pitch classes are duplicated. 

We now have a formal PC set, with the intervals  in semitones  between the PCs forming the keyindependent interval path 2221221 (7 PCs in the set, summing correctly to 12). 
Again, that final greenheaded parenthesised note is not in the set  it's shown only to elucidate the final 'wraparound' step (of 1 semitone) back to pitch class 0.
The alert reader will note that the PC set resulting directly from CΔ13^{#11} is, in fact, the Lydian mode of the C Major (Ionian) scale. But that's not why we've seemingly drawn attention to its 'Lydianicity' by colouring the F# in blue. No  the real reason for drawing attention to the F# is because in order to get the prime form of this PC set, we have noticed that the set's largest interval skips (the three consecutive 2s) bring us to that F#. Since the prime form requires that the largest interval skips are to be placed at the end of the interval path, this means that the F# must become the prime form's pitch class zero (in other words, its first note). Accordingly (by transposing from C to F#) we obtain the prime form  with its interval path of 1221222  shown below.
It's fairly easy to demonstrate that the PC sets which embody both the ordinary 13th and the minor 13th (with which we opened) are all exactly the same. 
All of the C13ths discussed thus far 'prime form' (as Forte PC set 735  the Locrian mode of the diatonic scale)  to some inversion of a Locrian, as the following two expositions show.
Can this mean that all 13th chords are some inversion of the Locrian mode of the diatonic scale?
How many 13ths are there?
It seems reasonable to proceed with such an enumeration only if we have some formal definition of exactly what constitutes a 13th chord. One of the most obvious qualities of the chord would appear to be that it comprises 7 distinct pitch classes. Another would appear to be that they should be constructed by stacking up six successive major or minor thirds after the initial root note.
The interval paths of such chords will thus be formed from six 3s or 4s and terminated by whatever value would take the path sum up to 24. Six '3s or 4s', being the same as six '3 + (0s or 1s)', it's reasonably clear that 64 distinct interval paths  labelled from 333333, 333334, 333343, 333344, … to 444433, 444434, 444443, 444444 will capture all possibilities.
It's also easy to see that any path containing either three consecutive 4s or four consecutive 3s must be rejected since the pitch classes on either side of such jumps are bound to be exactly an octave apart, thus being the same pitch class and violating the principle of distinctness. There are many other routes, within this procedure, which result in the duplication of pitch classes.
It turns out, therefore, that  after filtering out all of the interval paths which would result in pitch class duplication  only 28 ways of stacking major and minor thirds to build up some kind of 7 note 13th chord remain. These are, in ascending order of minormajorthirdiness:
3334344  1212213  3433344  1213122  3443343  2122221  4343334  2212131 
3334434  1221213  3433434  1222122  3443433  2131221  4343343  2212221 
3343344  1212222  3433443  1222212  4333434  1312122  4343433  2221221 
3343434  1221222  3434334  2122122  4333443  1312212  4344333  3121221 
3343443  1221312  3434343  2122212  4334334  2212122  4433343  2213121 
3344334  2121222  3434433  2131212  4334343  2212212  4433433  2222121 
3344343  2121312  3443334  2122131  4334433  2221212  4434333  3122121 
Also shown, in red to the right of each 34 construction, is the interval path signature of the PC set which contains the 7 distinct PCs of the resulting chord. These are  of course  in normal form because interval path signatures give you that for nothing. A quick inspection should demonstrate that these are by no means all just variations of the seven modes of the diatonic scale. The presence of 3s in such signatures is enough to disabuse one of such notions. There are also several with runs of four 2s.
By rotating all 28 of the (red) PC set signatures into their prime forms (with their largest skips packing to the right, as per Forte), we quickly uncover the fact that there are four distinct PC sets in play here:
Four Prime Form PC Sets  

1212213  1212222  1221213  1221222  
732A  734  732B  735  
<3,3,5,4,4,2>  <2,5,4,4,4,2>  <3,3,5,4,4,2>  <2,5,4,3,6,1>  
Harmonic Minor  Locrian Super  Indian/Ethiopian  Locrian Diatonic  
3334344  1212213  3343344  1212222  3334434  1221213  3343434  1221222 
3343443  1221312  3344334  2121222  3344343  2121312  3433434  1222122 
3434433  2131212  3433443  1222212  3433344  1213122  3434334  2122122 
3443334  2122131  3443343  2122221  3443433  2131221  3434343  2122212 
4333434  1312122  4334334  2212122  4333443  1312212  4334343  2212212 
4344333  3121221  4334433  2221212  4343334  2212131  4343343  2212221 
4433343  2213121  4433433  2222121  4434333  3122121  4343433  2221221 
They occur in four groups of seven arrangements  the seven modes of each of their common prime PC sets. The first (which includes the Harmonic Minor scale, 2122131, in its fourth row) and third (including Indian and Ethiopian scales in its third and sixth rows) column pairs are asymmetric PC sets (inverses of each other). The second and fourth are both symmetric PC sets, the first being the prime form of the halfdiminished scale (arguably the next most popular heptatonic division of the octave, encompassing as it does the hindi, melodic minor, overtone, javanese, and both locrian natural and super scales). The fourth is the various rotations (i.e. modes) of PC Set 735, i.e. LocrianDiatonic. The three types of 13th chords we dealt with above are in boldface.
Relationships between 13ths and the Diatonic Modes
The 13th chord patterns in the fourth, diatonic, group are  starting from the top, and not based on any particular scale
 3343434 ≡ m13^{♭5♭9♭13} ['Locrian 13th']
 3433434 ≡ m13^{♭9♭13} ['Phrygian 13th']
 3434334 ≡ m13^{♭13} ['Aeolian 13th']
 3434343 ≡ m13 ['Dorian 13th']
 4334343 ≡ 13 ['Mixolydian 13th' = the standard 'dominant 7th' mode]
 4343343 ≡ Δ13 ['Ionian 13th' = the major 7th dominant series]
 4343433 ≡ Δ13^{#11} ['Lydian 13th']
But naturally, upon actual transcription, one must commit to a key  say C:
Stepping away from the diatonic 13ths, if we based a 13th chord on the Ethiopian scale (row 6 column 3)  with its PC Set interval path signature 2212131  we would generate a major/minor 3rd stacking of 4343334 ≡ Δ13^{♭13}. The Indian scale (1213122 → 3433344) would yield a distinctly weird m13^{♭9♭11♭13}. We feel reasonably certain that there will be a circumstance where every one of these 28 possible 13ths will sound fantastic.
Squeezed 'Thirteenths'
The 28 13ths above are constrained to be contained within 3 or 4 semitones of a double octave span. As such, their top notes will always be a 'true' 13th, possibly flattened. The notes within the chord are not subject to undue 'stress' and the 7ths, 9ths and 11ths turn up in their expected places  perhaps occasionally bumped sideways as flattened or sharpened creatures as it were. However if this 'thirteenth pegging' is relaxed, there are  technically speaking  eight further 13ths. The first two are rather 'squashed' as the top notes are 5 semitones down from a double octave, giving us a doubleflattened 13th  which a musician will consider illegitimate (a doubleflattened 13th being  enharmonically  just a plain old 5th, the chord's 'internal' 5th already being flattened).
We note that the initial four notes of the first form a fulldiminished chord. It thereby already contains the 13th as a pitch class, albeit an octave lower (so not actually a 13th but a 6th). It's as if the chord has been put under so much compressive force that the 9th, 11th, 13th (and even the 7th) begin to crash into each other (as pitch classes). In both cases, the top flat 11th and doubleflat 13th are effectively the major 3rd and major 5th of the tonic. The flat nine is really the only 'novelty' in these chords and to call these chords 13ths is rather stretching a point (actually the opposite  it's compressing a point). As pitch class sets, these are mutual inverses, the first being characterised as an interval path signature 1212123 (Forte's 731A) and the second (its inverse, 731B) as 1212132 (which would of course 'prime form path' as 2121213), both sharing interval vector <3,3,6,3,3,3>, 'maxing out' with their 6 minor thirds.
Stretched 'Thirteenths'
The remaining 6 chords are  in contrast  stretched, and their top notes are only two semitones below the double octave. Thus a dominant 7thness turns up at the top end, rather than in the middle, of the chord (where the internal 7thnesses are all Δ, i.e. major 7ths). The first couple of these are the antisymmetric pair (path signatures of 2131311 and 3131211, corresponding to prime form signatures of 1121313 (Forte 721A) and 1211313 (Forte 721B) respectively, sharing interval vector <4,2,4,6,4,1> with maximal majorthirdy content.
In fact by now it's becoming rather difficult to 'spell' these as 13th chords, since the pitches tread on each others' toes so much. The above '+Δ13#9##11#13' is pure guesswork on this author's part.
The second pair of 'stretchy' 13ths have path signatures of 2221311 (prime path 1122213 ≡ Forte 730A) and 3122211 (prime path 1222113 ≡ Forte 730B)  again mutual inverses  with interval content <3,4,3,5,4,2>
There remain two further '13ths'. They each represent symmetric (selfinverting) PC sets, the first with a path signature of 3121311 (prime form path as 1131213 ≡ Forte 722, interval content <4,2,4,5,4,2>) and the second with path signature 2222211 (prime form path as 1122222 ≡ Forte 733, interval content <2,6,2,6,2,3> replete with major 2nds and major 3rds).
Terminological Conclusions
Are any of these eight stretched or squeezed chords really 13ths? Insofar as they comprise heptachords they are. Insofar as their construction involved upward skips of only major and minor thirds they are. But musically, they just aren't. They have too much internal compression or tension. This is due to not 'nailing down'  for the want of a better term  a (possibly flattened) 13th at the top of the runs of thirds and leaving the end of the chord flapping around in the breeze (as David Jones would say). Such freedom permits an absence of what one might expect of 'thirteenthness'.
So the 28 unstretched and unsqueezed 13ths above, distributed between only four PC Sets, are all (assuming fully populated ones) there really are. We note that this means there are only three distinct interval contents (two being identical since nonsymmetric PC Sets' forms  A and B  always share a common interval vector) available to carry the various flavours of all 28. These are <3,3,5,4,4,2>, <2,5,4,4,4,2>, and <2,5,4,3,6,1>.
Interval classwise, then, we have that a 13th contains either 2 or 3 minor 2nds [or major 7ths], with  correspondingly  5 or 3 major 2nds [minor 7ths] and (also correspondingly) 5 or 4 minor 3rds [major 6ths]. We also have that if the 13th contains only a single tritone then it must also contain the maximum number of perfect 4ths [or perfect 5ths] possible within a heptachord, i.e. 6, and must also contain 3 major 3rds [or minor 6ths]. Otherwise a 13th must contain 2 tritones and 4 each of major 3rds and perfect 4ths [or minor 6ths and perfect 5ths].
This means that if you elect a 13th chord constrained to containing only a single tritone then all else follows, i.e you cannot help but have 2 m2/M7, 5 M2/m7, 4m3/M6, 5 M3/m6 and 6 P4/P5, which further means that you have elected one of the 7 diatonic 13ths. If, however, you choose one with two tritones (the only remaining kind) then you have forced it to contain 4 P4/P5 and 4 M3/m6 and at least 4 m3/M6 and 2 m2/M7. The only choice you have left is a chord with 5 m3/M6, 3 M2/m7 and 3 m2/M7 or one with only 4 m3/M6 and 5 M2/m7 and 2 m2/M7.
It would appear, therefore, that there are  at most  two degrees of freedom available to anyone constructing a 13th chord from its interval content alone. Is that interesting or is that interesting?