Inspired by this video, here is a free AutoBuild template that can help you build a large-scale cactus farm very quickly. The screenshot above is 16x16, but you can repeat it as much as you want to make bigger farms.
Download:
The template itself is just a 16x16 checkerboard pattern like this, where the starting position is placed in the top-left corner:
The trick is that you build this template repeatedly, once holding sand, once holding cactus, and once holding string. This allows you to build the entire cactus farm even though AutoBuild can only place one block type at a time.
When using this template, it's important to always start building in the corner and to be mindful of which way you are facing. Here are some screenshots to hopefully explain it better (pretend the stone is sand and you are holding cactus that you want to place on top):
Placing the first block like this would work fine:
But placing it like this would not work. It would try to place the cactus blocks floating in mid-air outside of the farm area: