Add generic API to handle key-value pairs in storage