function amf0Encode(a) {
  let buf = Buffer.alloc(0);
  a.forEach(function (o) {
    buf = Buffer.concat([buf, amf0EncodeOne(o)]);
  });
  return buf;
}
Encode an array of values into a buffer
@param {Array} a
@returns {Buffer}