LSTM data configuration

I want to learn a LSTM neural network with 20 timesteps and 1 feature, but I ask for help when it comes to data configuration difficulties.

Data is time-series data, one data is composed as follows, and the total data is 9000.

t1 - value1
t2 - value2
t3 - value3
t4 - value4

t19 - value19
t20 - value20
(20 timesteps)

Here, I want to take 18 timesteps as inputs from the beginning and 2 as outputs (predictions).
And, of the 9000 datasets, we want to use 80% for training and 20% for testing.
In this case, the input dimension I think is (batch=?, seq_len=18, feature=1).
So, here I understand the data composition for 1 dataset, but I don’t know how to construct the total dataset.

In addition, I would like to organize the data as shown in the picture below.


(data is independent, not time-series, just number of samples.)

I want your kind help.
Thank you.