Pack multibyte binary values into buffers with specific endiannesses.