Buffer: Two new methods for duplicating data

The `loop` parameter indicates that data will be generated in a loop form and
this loop will be repeated `dup_count` times. I-e (0, 1, 2, 0, 1, 2, ...)
When `loop` is set to false, each input will be duplicated `dup_count` times.
I-e (0, 0, 0, 1, 1, 1 2, 2, 2)
By default each input is duplicated once.