Just a take a bunch of one specific item, apples for example, then use ultrahand to stick them all together. Then it's automatically saved as an autobuild template.
After that just find an area with the item you want to gather, activate autobuild, and it will gather the items for you.
I now have over 200 apples