Basic rules of the area of effect
Regarding the area of effect …
The description of a spell specifies its area of effect, which usually has one of five different shapes: cone, cube, cylinder, line or sphere. Each area of effect has a point of origin, a place from which the energy of the spell explodes. The rules for each shape specify how you position its origin point. Typically, an origin point is a point in space, but some spells have an area whose origin is a creature or object.
The linked section continues to explain exactly what each of the five basic shapes means, and none allow formatting.
One of the design precepts of the 5th edition is plain language – in other words, spells, characteristics, and traits only do what they say they do. Take these spell descriptions for example …
Wall of fire
You create a wall of fire on a solid surface within reach. You can make the wall up to 60 feet long, 20 feet high and 1 foot thick, or a corrugated wall up to 20 feet in diameter, 20 feet high and 1 foot # 39; thickness.
A wall of invisible force arises at a point you choose within range. The wall appears in the orientation you choose, as a horizontal or vertical barrier or at an angle. It can float freely or rest on a solid surface. You can shape it into a hemispherical dome or a sphere with a radius of up to 10 feet, or you can shape a flat surface made up of ten panels 10 feet by 10 feet. Each panel must be contiguous to another panel. In any shape, the wall is 1/4 inch thick.
Wall of ice
You create a wall of ice on a solid surface within reach. You can form it into a hemispherical dome or a sphere with a radius of up to 10 feet, or you can shape a flat surface made up of ten 10-foot square panels. Each panel must be contiguous to another panel.
A wall glistening with bright light appears at a point you choose within range. The wall appears in the orientation you choose: horizontally, vertically or diagonally. It can float freely or rest on a solid surface. The wall can measure up to 60 feet long, 10 feet high and 5 feet thick.
A non-magical wall of solid stone begins at a point you choose within range. The wall is 6 inches thick and is made up of ten 10-foot by 10-foot panels. Each panel must be contiguous with at least one other panel. Alternatively, you can create 10 foot by 20 foot panels that are only 3 inches thick. (…) The wall can have any shape you want, although it cannot occupy the same space as a creature or object. The wall does not need to be vertical or rest on a solid base. However, it must merge with the existing stone and be solidly supported by it. So you can use this spell to fill a chasm or create a ramp.
These spells all create walls but have very specific and different rules for how these walls can be carved. Two can float in the air at any angle you like (light and strength), the rest must touch the ground or a particular material. Some are built with panels of a particular size (Strength, Ice, Stone), while others have a defined size (Light and Fire). Some must be a flat plane or a sphere (Force and Ice), while others can be shaped endlessly (Stone) or can make cylindrical rings (Fire).
It is quite clear from these examples that the rules for formatting a spell, when available, are specific to the individual spell. What is true for one spell is not true for others.
One of the core concepts of 5E is design based on exceptions. If something is supposed to be different from the general rules, it will say so – and the explicit exception prevails. General rules are covered in the area of effect and do not provide for any formatting.
As mentioned earlier, another fundamental concept is the use of natural language. If he doesn't say he can be shaped, he can't be shaped.
The specific example, Alarm …
Choose a door, window or area within reach that does not exceed a 20-foot cube.
A suggested answer to the linked question suggests that you can divide it into blocks. The spell does not say a certain number of cubic feet, nor panels, nor ring, nor anything else. A room is a "zone" in plan language, so Alarm fills the specific shape of a room, as long as that room is "no bigger than a 20-foot cube". If you're outside, it could cover a smaller area (like a clearing) as long as that area is "no bigger than a 20-foot cube". But turn it into a ring (square or other) – no.