parametrize JuMPArray on dimension for tighter method signatures, fixes #299