Need more information. Can you send an image of what you are looking for? What is the context? Do you need this for a rendering, or orthographic drawings? Depending on your needs, I can imagine a few different approaches:
—For just renderings, say of a historic fence, create a texture from a photographically sampled image. Mask out anything not the fence, and make the mask transparent. You could then apply the texture to a very thin wall object. I have used this technique very successfully for plant hedges and fences with see-through gaps.
—Depending on the geometry of the fence, the handrail tool might give you the results you want
—You could model a single upright in 2D and 3D, then array.
Others may have other suggestions, but it would be helpful to know more precisely what you want.