Entanglement in Finite Quantum Systems Under Twisted Boundary Conditions