To see a sample ballot for New York city, for the November 7, 2017 ballot, see here. New York insists on continuing to use a ballot format similar to the one that was used long ago, when all precincts in the state used mechanical voting machines. The old machines, in use since 1892, used levers, and the old ballot format had to fit the machines.
But there are no more mechanical voting machines, so there is no reason whatsoever to use the old format. The 2017 ballot lists some Mayoral candidates on a top row, and there is a blank space in the middle of that top row with no candidate. Then more candidates for Mayor are listed on a second row. This suggests to the voter that the Mayoral candidates in the top row are somehow more deserving of attention. No other state has a general election ballot quite like this, although ballots in most counties of New Jersey are somewhat similar.
Because of the widespread use of electronic vote-counting machines, 42 states now use an office-group ballot style, in which all the candidates for a particular office are listed together. The voter goes from first one office, to another office, but each time all the candidates for a particular office compose a single group. There have been bills in the New York legislature to reform ballot access, but they never pass. Thanks to Mark Axinn for the link.