You may not have to unbind all resources - you could always ensure your texture array occupies the first n slots, and query the EffectType on the resource variable (GetVariableType), and use the EffectTypeDescription.Elements value as the count. This is bit of a guess though.
Edit: Another (harder) way of doing it of course is by using ShaderReflection, not only to inspect the # of elements, but also to get the bind point of the resources.