Update set.rst

Updated the documentation to better explain what each line of code was. It was difficult for beginners to get started.

Not sure if 'associative array' is correct terminology for Twig?