Both MailBuilder.AddAttachment and MailBuilder.AddVisual metods have overrides that take byte array as a parameter:
MimeData att = builder.AddAttachment(new byte[]{ (byte)'A'});
MimeData visual= builder.AddVisual(new byte[] {1,2,3});
Please note that as you don't pass file name anywhere, content-type is not recognized and file name is not set. You should do that manually:
att.FileName = "report.txt";
att.ContentType = ContentType.TextPlain;
visual.FileName = "image.jpg";
visual.ContentType = ContentType.ImageJpeg