For kickoff, The rule says that “players on the kicking teams must be equally spaced across the entire field starting within 5 yards of the sideline”. In theory this means the widest players should be 1/2 way between the sideline and the numbers and players should be spaced 3-4 yards apart across the field. We’re not taking rulers out and measuring, just eyeballing.
There is also a NFHS rule that says you must have at least 4 players on either side of the ball at the time of the kick. So, technically you could go 6 players on one side and 4 on the other. But, you would have to move the ball over from the middle of the field about 4-5 yards, because if it’s in the middle, you can’t meet the INFC requirement for be spaced “equally” while having 6 players on one side.
There are no requirements for spacing on kickoff return.