I have a service ladder family in which the rungs:
1. Are an array of the first rung, that is...
2. stretchable in width via the ladder's width type parameter, and
3. have quantity as a parameter calculated by dividing the ladder's length instance parameter by it's type rung-spacing parameter.
It took me a bunch of trial and error. I'm not entirely sure I remember how I did it finally. But...
I think I made and constrained a reference line between the two side reference planes that would represent the lowest rung between the two stringers. Of course I created the ladder width parameter between the two planes. Think I created a "first rung height" parameter to control the line's distance from the end. Got it flexing correctly. Then made a sweep along the line for the rung. Got it flexing correctly. Only then did I array it on up the ladder (I think only 3 instances to start with). Made sure the array was a "to first" distance instead of a "to last" distance. Made that distance my "run spacing" parameter. Got it to flex correctly with the 3 rungs. Then built the stringers, got length flexing correctly, and only then made a calculated parameter for the array quantity. Finally put lines on the two side planes and swept the stringers along them.
For a grating with constant (or at least type driven) stringer spacing, you could do the same thing, except your would have an array in two directions instead of just in the length. Basically you would build my ladder except instead of two stringers you would have an array in the width direction just like the array in the length direction.
Be warned...do NOT load such a family into a project and then make it a mile long. You WILL crash Revit. Honestly, for a grating, unless you absolutely need the accurate detail for a close-up 3D rendering or something, I strongly recommend just making a single extrusion with a length, a width, a thickness, and giving it a cross hatch model surface pattern.
Now as far as getting something stretchable with the little blue arrows when loaded in a project...you've got to make sure the reference planes/lines constraining it are set to be "Strong references" and you've got to make sure the parameter in question isn't "locked" Only then will you get the grip arrows for manual stretching. I think. Maybe.