Fix the macro implementation and array32 encoding

The macro is still not perfect, but at least it doesn't
seem to fail as badly as it did before :)

The macro's code needs to be rewritten