Unlike the general optical needle along the optical axis, we propose a method to generate a three-dimensional (3D) array formed by optical needles with prescribed length and polarization direction. Moreover, the geometric model of the created array can be specified. With the aid of antenna array pattern synthesis theory and time reversal technology, a virtual uniform line source (ULS) antenna array arranged regularly near the confocal region of two high numerical apertures objectives is employed to obtain the required illumination in the pupil plane for creating the desired focal fields. Numerical results demonstrate that there is a one-to-one correspondence between the focal field and the virtual ULS antenna array elements. The length and polarization direction of the optical needles depends on the length and spatial direction of the virtual ULS antenna. The peculiarities of the focal field array, such as the polarization, length, number, spatial position and array structure, can be customized according to application requirements. The created optical needle array can be used for such application as 3D synchronous particle acceleration and manipulation, 3D parallel fabrication.