I will address each of your questions separately, hopefully that will suffice as a response. Let me know if there is anything that is unclear, unexplained or difficult to understand in this answer.
Are characteristics random?
No, characteristics are not random. Which characteristic displays for your Pokemon is based on its IVs -- specifically, which of your Pokemon's IVs are the highest and what value this highest IV is. The only time characteristics are random is if two or more stats are tied for having the highest IV value, in which case the characteristic is unpredictable and cannot be manipulated. Displayed here on Bulbapedia is a chart that outlines which description will be displayed based on which IV is the highest and what value it is.
Note that while characteristics are not random, IVs are, which in turn makes characteristics seem random in nature. IVs can however, be manipulated to an extent through breeding as this Bulbapedia article details; they're most reliably controlled with items like the Destiny Knot and the Power items which are also explained in that article.
Is it possible for the offspring to have the "Likes to thrash about" characteristic if neither parent has 31 Attack IVs?
Yes, this is entirely possible. First of all, the characteristic "Likes to thrash about" is not restricted to Pokemon with 31 Attack IVs; as the chart of Bulbapedia displays, this characteristic will show if Attack is the Pokemon's highest IV and if the IV's value is 1, 6, 11, 16, 21, 26 or 31. So in your situation, if the Bagon offspring's Attack IV is its highest and that IV is any of the aforementioned values, then it will have the "Likes to thrash about" characteristic.
Secondly, your question implies that while breeding, the baby cannot have a certain IV value if neither of its parent have it -- this is untrue. While parents do pass down a limited number of IVs in breeding, the others are left to chance, which is where the offspring may arbitrarily gain the "Likes to thrash about" characteristic. No matter the extent at which you try to manipulate IVs in breeding, you can never guarantee the result of every one of the offpspring's stats, but with Power items you can manipulate a maximum of two stats if each parent holds a different one of the items. Unfortunately, if you're after 31 Attack IVs, Power items will not be of help to you since you don't have a parent with 31 Attack IVs available.
So basically, due to the exact breeding mechanics, if you breed those two parents together, it is most likely that they will inherit an Attack IV of 30 from one of their parents. Still, the possibility remains that you will hatch a Bagon with a randomly-generated 31 Attack IVs and the "Likes to thrash about" characteristic, assuming there are no others stats tied at 31 in which case its characteristic is left to chance.
Are there only a few characteristics I can get from these parents?
No. This question also implies a bigger influence than there is from the parent's IVs; the parent's IVs do not ever guarantee that the offspring will have the same IVs, unless they are given a Power item, in which case that parent will always pass down its exact IV in the corresponding stat. Theoretically, you could get any one of the characteristics from the two parents you've described, as there are no restrictions made based on their held items or their IV values.
This next part is rather trivial, but the only time where any of the characteristics are guaranteed not to appear on the offspring (outside of influence from Destiny Knot or the Power items) is if both parents' IVs are consistenly at 28 or above. As the parents combined are guaranteed to pass down at least one of their IVs, it is then also guaranteed that the offspring's highest IV will be 28 or above, and so the characteristics that could appear when the highest IV is 2, 7, 12, 17, 22 or 27 will never appear. This goes on if they're all above 29, which means that characteristics that appear with a maximum IV value of 28 will also never appear. This does not apply to your pair of Bagon though, as they have several IVs below 28; if any of those are the only one passed down to the offspring, then with some "luck", any of the potential characteristics are possible for it.
If I'm breeding two parents with perfect IVs, are three IVs completely random or not?
If you're not using the Destiny Knot or any of the Power items, then yes, there will be at least three IVs generated randomly -- but there could also be as many as five, as there's potential for the parents combined to pass down anywhere from one to three of their IVs. (The exact process is annoyingly complex, but is also detailed in the Bulbapedia article.)
If you have two perfect IV parents, your best bet for hatching 6 IV offspring is to give one parent a Destiny Knot and the other parent any of the Power items. More often than not, the Destiny Knot and Power item will clash and attempt to pass the same stat thus rendering the Power item unhelpful, but the chance is still a bit better with than without. If you're also looking to pass down natures, use an Everstone instead of a Power item. You will eventually hatch offspring with 6 perfect IVs -- unfortunately, as the Destiny Knot only guarantees that the parents will pass down five stats, there'll always be one IV that's left to chance.
Simplified version: IVs are more random than you seem to think; at most, the parents combined will pass down a total of three of their IVs. Unless you give a parent a Power item, it is never guaranteed that they will pass down their IV in any particular stat. Due to this randomness, it is absolutely possible for the offspring of your two Bagon to have the "Likes to thrash about" characteristic, unless you give one of them a Power Bracer in which case they will always pass down their Attack IV of 30, which cannot create the characteristic "Likes to thrash about". The same randomness means that your two particular parents could theoretically have offspring with any of the possible characteristics.
Simplified simplified version: IVs are random, characteristics are not. Without Power items, no IV is ever guaranteed to be a certain value. Your two particular Bagon could give offspring with any one of the potential characteristics.