The new input "XNew" now has the last dimension corresponding to different observations in the data set.
You will also have to change the layers as shown below:\n
layers = [ ...
imageInputLayer([1 1 nFeatures]);
options = trainingOptions('sgdm');
trainedNet = trainNetwork(XNew, t, layers, options);
"trainNetwork" is actually agnostic to images or any other type of data, as long as you have less than 3 dimensions and all observations have the same dimensionality. In that case, observations are the 4-th dimension, like this example. This has the advantage that data requiring up to 3 dimensions (like colour images) can be easily represented. However, "trainNetwork" is not agnostic to the type of data in the sense of what layers make sense to use. If you want to use non image data, then the variety of layer that would make sense to use is reduced.
Further general information:
In regards to performing classification/regression with non-image, non-sequence data, it is beneficial to use the "FullyConnected" and "ReLU" layers instead of layers like "Convolution2DLayer", "LSTM", "MaxPooling2D". Using the later layers will not make much sense since they all assume some spatially or temporal correlation on the data.
There is also functionality of creating custom layers to implement other custom functionalities based on your requirements. You can refer to the examples in the following documentation link: