lavu/mem: reimplement the dynarray functions with the macro.