Fallout 4 containers and storage

In Fallout 4, containers are world objects that have their own inventory and that can be interacted with.

Characteristics
The player character can transfer items from the container's inventory to their own inventory and vice versa. When a container is locked, its inventory cannot be accessed until the player character unlocks it. When a container is marked as owned, taking items from such container is considered as theft and might turn nearby characters hostile. Items placed in a container will disappear over time. Containers in settlements that are controlled by the player character are not affected.

If one wishes to store an item in a container, the "Transfer" option must be selected by pressing the corresponding button. From there, they can choose what items to store and take.