Pipeline creates a pipeline that processes a slice of values of any type
by passing it through a series of stages. Stages can be run concurrently
or sequentially, depending on the value of the 'concurrent' flag.
type StageFunc[C any] func(in []C) (out []C, err error)
StageFunc is a function that transforms a slice of values of any type and returns
the transformed slice and any errors that occurred during processing.