[#902] Remove usage of generics for output of Encoder/Decoder to make them more flexible again