This is too adorable!
While I can't find the exact recipe, I think the way to set this up would be to make a template for where to place the cupcakes, set up your icings, and then create the right colors! You can do a "knit" frosting pattern like shown here, or something more simple.
Add the details with different color frosting, and you're good to go! I would love to try this with a chocolate peanut butter recipe.