This is a cool idea, but Pixelblaze is currently a subset of modern JavaScript, whereas I think interface comes from TypeScript and is a superset / additional keyword.
If you wanted a JavaScript-y solution you’d allow for objects. I can see that being more problematic though. Hence my idea of just stealing a small part from Typescript.
I guess that would be nice, but for me an array of 3 values is just fine:
// RGB framebuffer Storage
var FB = array(pixelCount)
FB.mutate(()=>{return array(3)})
// ... later, calculate r g b and ...
var Pixel = FB[x + y * width]
Pixel[0] = max(Pixel[0], r)
Pixel[1] = max(Pixel[1], g)
Pixel[2] = max(Pixel[2], b)