Whenever you have the option, use weapons
Weapons are force multipliers and equalizers. An elementary schooler has almost no chance in an unarmed fight with an adult. With swords or knives they're going to still almost certainly lose, but there's a chance of them doing some real damage and possibly getting in a lucky stab that decides the fight, and a child with a knife can probably be areal danger to an unarmed adult. With guns it's even more fo a toss-up. Child soldiers with AKs are a thing, and a bullet doesn't really care who shot it.
For flailing around, use flails
A goblin suicide trooper would paradoxically work best as not a throwaway unit but one heavily invested into. Put it in plate armour, put blades and/or spikes on the outside to make it hard to grab and hold down and attack chains with spiked balls on them to its gauntlets. Chain weapons are relatively powerful without needing to put in much power, they're very hard to block or parry and they're a danger to everyone including the wielder when employed without caution. Maybe also put a dagger-like spike for close-range stabbing on the gauntlets. What you get is a unit that can't really march or do anything but fight, they need to be suited up directly before battle, possibly drugged up and sent out screaming and flailing around, ideally from close distance. Supplement with poison, firebombs and explosives as available.
The reasoning here is that a martial art which makes you a hazard in battle also makes you a hazard to your companions. As such, you can't really fight in close formation but would fill a more shock-trooper-like role. Such fighters would be useful to disrupt enemy ranks and delay their advance, possibly also to erode morale. In a field battle they'd be best used as a distraction to set up a bigger plan, funnel the enemy into a trap or make them more vulnerable to ranged attacks.
As a martial art there'd be very little to it. The more random and unpredictable the better. The most important ability besides pain tolerance and endurance in general would be balance: these fighters need to be able to stay on their feet as long as possible. Expect lots of lower body conditioning, body hardening, running and jumping and possibly some acrobatics and chain weapon training for those who survive long enough. You could supplement this with jump tackles and grappling for single-target assassination with the dagger-spikes. Footwork should focus on stability with rooted, deep stances that allow for jumps and forceful rotations, not unlike how Shotokan Karate looks (even if Karate is actually much more grappling-based than modern interpretations would have us believe).
Against orcs this would probably work semi-well, especially if you use poisoned weapons, because you'll definitely get cut fighting those things. But they're pretty helpless against a solid shield wall and/or spears. When massed, they might be able to jump, slide and climb over, under and around defences, but they're more useful as ambushers. However, against a single orc or just a few, this would take one goblin from a small annoyance to an actual danger.
With elves they'd be pretty helpless. Elves tend to have excellent senses and thus are hard to surprise. Since they tend to focus on ranged weapons, they'd probably just kite them until they drop dead.
All in all it's not a very practical style. More so if you consider that what I just lined out relies on expensive and somewhat high-tech (for the time) equipment which generally wouldn't be used on suicide squads. But then again, goblins aren't really supposed to be very good at stuff, are they?
I'm here! Now I'm over there! Now you're gone!
For your gnomes you want to focus on evasive movement. That's a good start for a small and weak fighter and the first style that comes to mind here is Baguazhang. Circling an opponent is, if you're quick enough to pull it off, a good tactic to not let them bring their superior strength to bear. Smaller creatures are often thought to have faster perception, so this might just work.
Ignoring for a moment that Bagua is actually intended as a supplementary style for already accomplished martial artists, its focus on stand-up grappling isn't a good fit for gnomes. You'd want strikes that have as long a range as you can muster and target weak points so you don't need much strength. An armed Outboxer, basically. Thrusting weapons like spears or rapiers would work best, as might quick ranged weapons like slingshots or pistols (gnomes are tinkers, yes?). Low kicks and sweeps to destabilize the opponent are also useful. If you insist on nonlethal options, try whips and bolas.
What you end up with is a martial art that relies on being more skilled than your opponent. That's probably the expected outcome when you're weaker and smaller.
Against an orc your main tactic is to keep distance and hope that your attacks are strong enough to disable. Against an elf, use your magic to catch them off guard and hope for the best. Elves have basically the same strengths as gnomes, only they're also stronger, so that's often not really a fair comparison. If elves in your world have specific discernable weaknesses, this answer might change.