I am needing to write a general way to construct a set that contains all the subsets of a universal set.

For example: Let A be the universal set, and S be the set containing all the subsets of A.

A = {a1, a2, a3}

S = {{∅}, {a1}, {a2}, {a3}, {a1, a2}, {a1, a3}, {a2, a3}, {a1, a2, a3}}

How can I construct the set S in a general way?