Core: use C99 flexible array member when possible