Created by: liym27
- Support the input of slice is LoDTensorArray;
- Support read elements of list in dygraph_to_static. For example:
arr = fluid.layers.array_write(x, i)
res1 = arr[i]
res2 = arr[0:i]
Note: https://github.com/PaddlePaddle/Paddle/pull/24250 (Support list pop in dy2stat) depends on this PR.