How can I convert mutiple arrays with different length to 2d-tensor