How can I vectorise or unroll for loops for efficient execution in Python?