Generic serialization to binary for arbitrary containers and fundamental types