There is a pattern in the solution: Consecutive numbers are separated by one field and enumerated horizontally from the left to the right, wrapping around the edges, i.e. ..._4_3_2_1.
Every line of the solution has the same sequence of numbers, shifted by 4 places to the left relative to the line above it.
This makes me believe the construction is based on a clever observation and repetition of a pattern.