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 repeted `dup_count' times.
When `loop' is set to false, each input will be duplicated `dup_count' times.
By default each input is duplicated once.