That depends on how you set up your inventory in the first place, there are many different ways to do an inventory.
If you have two instances inventory arrays, assuming you can already add and remove items, it would be as simple as removing from one and adding to the other. To pick the correct inventory to manipulate, you can utilize containers. This way your inventory array will be attached to a sprite or other object you can pick by mouse or touch.