There may be some confusion over terminology. In ImageMagick, the level of a HALD clut is the square root of the length of each side of the cube. For example, HALD:8 is a cube with 64x64x64 = 262144 entries, and HALD:12 has 2985984 entries.
ImageMagick can’t create HALDcluts of 8x8x8 or 12x12x12. The smallest sizes are 4x4x4, 9x9x9, 16x6x16, 25x25x25, and so on.
A more general clut wouldn’t need to be a cube, eg it might have 5x13x7 entries. ImageMagick can’t process those.