Compared to radial magnetization, Halbach permanent-magnet (PM) array inherits some attractive features: strong field intensity, self-shielding effect, near-sinusoidal airgap flux density distribution. Due to the difficulty in realizing continuous magnetization direction on single PM annulus, Halbach PM arrays are generally realized by discrete PM segments. In most cases, the magnetization directions of these PM segments change equably, and the arc length of each segment is equal. However, the segment number is limited by the size of machine and some magnetization directions are difficult to produce. These issues limit the application of Halbach PM array in more industry fields. In this paper, both analytical and FEA methods are applied to analysis the flux density distribution produced by the Halbach PM array when changing the arc length and magnetization directions of each PM segment. It is found that with different combinations of arc length and magnetization direction of each PM segment, similar amplitude of main flux density can be produced in the air gap. This knowledge can be helpful to avoiding specific magnetization directions which are hard to process or in danger of demagnetization. In conventional Halbach PM array, the total number of PM segments is integer multiple of pole number. However, this paper shows that by designedly selecting the magnetization direction and arc length of each segment, the specific poles of the magnetic field can be generated by variable number of PM segments with acceptable harmonic components. Therefore, it is more flexible to choose the segment number of Halbach array for different occasions. Moreover, this paper discusses how to produce or reduce multi particular harmonic magnetic fields in Halbach array by designing the magnetization directions and arc lengths. More detailed analysis will be presented in the full paper.