Mean goblins
Ah, yes, tactics....
Crenelated walls on high ground grant a +4 cover bonus to AC, and a +1 bonus for high ground.
Rough terrain prevents melee characters from rushing in on the horde. Reach weapons grant attacks of opprotunity on charging characters, and allow more than eight goblins to surround a character.
Make your Goblin leader a 3 HD Cleric and have him heal the squad leaders, and have his direct sargeant a 1 HD Marshall, with the "combat tactics" minor aura, granting all gobs within 60 feet a bonus equal to the Marshall's Cha modifier to Bullrush, Disarm, Grapple, Trip, and Sunder attempts.
The gobs surround your melee PCs, use the aid another action to grant a +16 (+2 per assisting Goblin, and the +2 for flanking) to attacks, or whichever combat maneuver you want. I'd have one goblin with each of the "improved" tactics feats, and simply switch from one goblin to another to take advantage of the aid another.
Start by tripping (+1 BAB -4 size + 2 flanking + 14 aid another + 1-4 morale (from the Marshall) + 4 from improved trip and maybe even another +2 from Bull's Strength (Cleric buff). When they fall prone (try not to with a +23 modifier) every time they get up they inncur an attack of opprotunity from each of the surrounding goblins (with the +14 aid another bonus and the +2 flanking bonus). Three can attack and deal damage, the fourth can trip to put the PC back on the ground, leaving the remaining four to strike when he tries again (using a double move.)
You can then move on to disarming, using a different goblin with the improved trip feat (at about the same modifer, as your tripping goblin is now "aiding another" and your disarming goblin now no longer is. Now your modifier is effectively 27 (the -4 the PC suffers from being prone counter acts the goblins -4 size modifier).
Have the ranged goblins harrass the spellcasters, perhaps having them ready actions, waiting for the spell casters to cast, to attack casters as they cast. Ranged Sunder can be a pain in the ranged fighters asses, ready an action to sunder whomever fires a ranged weapon.