How do set partitions get mapped by restricted growth functions
We want to define a sequence of nonnegative integers $[a_1, a_2,\dotsc, a_n]$ with $a_1=0$ such that for each $1\le i\le n$ we'll have $a_i\le 1+\max\{a_1,\dotsc, a_{i-1}\}$ (Note the last index; the definition you gave would allow $a_i$ to be anything). This condition doesn't uniquely determine $a_i$, rather it gives several possibilities in general.

Let's generate some of these sequences.


The shortest is just $[0]$
To set $a_2$ we must have $a_2\le1+\max\{0\}=1$ so $a_2$ could be either $0$ or $1$, giving us the length-2 sequences $[0,0]$ and $[0,1]$
To set $a_3$ we either start from $[0,0]$ or $[0,1]$. From $[0,0]$ we see that $a_3$ could be either $0$ or $1$, giving us $[0,0,0]$ and $[0,0,1]$. From $[0,1]$ we could have $a_3=0,1,2$, giving us $[0,1,0], [0,1,1],[0,1,2]$.


Let's look at the length-3 sequences, $[0,0,0],[0,0,1],[0,1,0],[0,1,1],[0,1,2]$, and see how they give rise to partitions of the 3-element set $\{a,b,c\}$.


$[0,0,0]$ tells us that each element lives in set 0, giving us the partition $\{a,b,c\}$.
$[0,0,1]$ tells us that elements $a,b$ live in set 0 and $c$ lives in set 1, giving us the partition $\{a,b\},\{c\}$.
Similarly, $[0,1,0]$ gives rise to the partition $\{a,c\},\{b\}$.
Similarly, $[0,1,1]$ gives us $\{a\},\{b,c\}$.
Finally, $[0,1,2]$ gives us $\{a\},\{b\},\{c\}$.


By inspection, these five growth functions give rise to all the five possible partitions of the set $\{a,b,c\}$.