Is anything mentioned in the series that could explain how these 'sweets' were made?
The Chocolate Frog Card included with the Hasbro Chocolate Frog Candies included a bit about the genesis of the 'sweet'.
Bertie Bott was born in 1935. He invented Bertie Bott’s Every Flavor Beans quite by mistake. His original purpose was to create tasty candies from food. He accidentally included a pair of dirty socks in his experiment!
However, there is no evidence that Rowling wrote the cards for the Hasbro candies. Some of them don't even fit with Rowling's characters.
Rowling is known to have written the cards in the Chamber of Secrets video game, but those cards don't really give much inforamtion about the candy.
We don't know.
It's not mentioned anywhere in the main series, tcc, fantastic beasts, or Pottermore as far as I can tell. On Bertie Botts' chocolate frog card, it states that he created them by accident, but that's all we know.