Make a goblin grinder without the grinding parts, and have him run back and forth across your marksdwarves' field of view. Something like this:
+^c+
+ +
###########+##+
+ + #+
+ + #+
+ + #+
+ + #++++->freedom
+ + #+
+ + #+
+ + #+
###########+##+
+ +
+^c+
This is extremely stripped down and not to scale, but what we have here is a shooting platform to the left (fortifications and access not shown) and a looping path to the right. The goblin is dropped where the 'g' is (use a pit with a hatch cover for this), and immediately runs to the right to try and escape. It steps onto the pressure plate (^), which opens the hatch (c), which blocks the path. However, the hatch to the north isn't open, so the goblin runs up there, past the waiting marksdwarves. Once the goblin reaches the pressure plate before the hatch, the hatch opens, blocking that path and leaving only the now-open path to the south. And so on.
You might need some extra goblins to start with. Dwarves always fire at where an enemy is, not at where the enemy will be once the bolt has finished travelling. So while experienced marksdwarves will consistently miss the goblin, novices shoot so wildly that they will accidentally lead a target. Also, keep the route short. The longer it is, the straighter the shot can be.
(The gap between the goblin's route and the wall of the chamber is to allow for bolt collection. You can close this gap and add more floors to the north and south walls if you're swimming in bolt material.)