The popular tongue twister Peter Piper picked a peck of pickled peppers is based on which element of figurative language?

It is based on alliteration. An alliteration is a repeated consonant saound at the beginning of words. The repeated "p" sound in "Peter Piper picked a peck of pickled peppers" makes it an alliteration. Hope that helps.
Alliteration