@adarakchian so in both your way and the way I've proposed - the main issue is to replace the array.array with other container.
Using the QBuffer mode seems to be less intrusive way, while in your case the container type is changed forcefully.
In both cases the target seems to be the same: the container type should not make an assumption about the value type used for line data.
One more note: there are some assumptions about the underlying container type inside the LineBuffer - and this is reflected in the LineBuffer.mode ( QBuffer or Unbounded).
Depending on this mode, different methods are used for slicing and other operations inside the LineBuffer methods
Given that, it is important to keep the container type compatible with what LineBuffer logic is expecting IMHO