For example, when a mesh doesn't need skinning set all values of "a_Deformers" to zero, that way its elements are within your array bounds of "40".
Did you have in mind setting all values using glVertexAttribIPointer or in the shader some how?
EDIT: can't assign to varying in the shader. I'm guessing you meant glVertexAttribIPointer. PS: I do use glDisableVertexAttribArray a_Deformers when no skinning is needed. Still digging.