RNN predict across new timeseries

For simplicity, I assume that the following timeseries $$X_{A}$$ and $$Y_{A}$$ are univariate.

I am familiar with training RNN networks, such as LSTM, on a given timeseries $$X_{A} = (X_{A0}, X_{A1}, X_{A2}, ...X_{AN})$$ and targets $$Y_{A} = (Y_{A0}, Y_{A1}, Y_{A2}, ...Y_{AN})$$, such that $$Y_{AN} \approx \hat{f}(X_{AN} | X_{A(N-1)}, ... X_{A1})$$. Especially, in this direction forecasting problems can be modeled as $$Y_{Ai}=X_{A(i+h)}$$.

However, I care about a different problem. If my training set has multiple (univariate) time series $$X_{A}$$, $$X_{B}$$, ..., $$X_{K}$$ along with their target univariate series $$Y_{A}$$, $$Y_{B}$$, ..., $$Y_{K}$$, is it possible to structure this as a single deep learning architecture?

There are two necessities for prediction application:

(1) As new data arrive for a timeseries that actually was in the training set (like $$X_A$$ in the example), for instance the new values $$X_{A(N+1)},X_{A(N+2)}$$, to predict $$Y_{A(N+1)},Y_{A(N+2)}$$

(2) To also be able to predict $$Y_L$$ values for a new timeseries $$X_{L}$$ that was not in the original training set $$\{(X_A,Y_A), .., (X_K,Y_K)\}$$

In summary, to be able continue predicting for known timeseries, but also generalize for new timeseries. I am interested in any references towards problem formulation or solution that is similar to what I have described.