Let's use some templating so we can use any container of choice

This does however mean that we suddenly are mostly in the header file
not a real issue imo, but keep it in mind regardless. The original encode
method is still there, but it accepts a initializer_list instead now.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>