I had a similar problem last week consuming a .NET service from a third party. I came up with two solutions.
Solution one was to use String manipulation to look for the list, and if it wasn’t there to insert it in the right place using a regular expression. I then had a single Input Mapping I could use that would be consistent. String manipulation isn’t really a good idea as it’s very fragile.
Solution two was to have two Input Mappings, one that expects a list and one that doesn’t. If the list failed to import, I could fall back to the version without the list.
Ideally you need your provider to return consistent data.
Hope this helps.
I ended up implementing a Java Action, which intercepts the response received from REST API, makes checks for certain objects which are expected as Array, converts those to arrays if required and then returns modified response back to Micro flow.