Design patterns for flask API implementation

I am using flask with flask-restplus and sqlalchemy.

My rest API function looks like the following:

@ns.route('/user')
class UsersCollection(Resource):

    @jwt_optional
    @permissions.user_has('admin_view')
    @ns.marshal_list_with(user_details)
    def get(self):
        """
        Returns list of users.
        """

        users = User.query.all()

        return users

I am willing to add additional data to users collection which should be returned by the API. Some of this data may be stored in other DB tables, while other is stored in memory.

What I am usually doing is something like this:

@ns.route('/user')
class UsersCollection(Resource):

    @jwt_optional
    @permissions.user_has('admin_view')
    @ns.marshal_list_with(user_details)
    def get(self):
        """
        Returns list of users.
        """

        users = User.query.all()

        # Add additional data
        for user in users:
          user.activity = UserActivity.query ...  # from DB 
          user.online_status = "Active" # Taken somewhere from memory

        return users

Obviously I don't like this approach of adding data to the User object on the fly. But what is the best design pattern to achieve it?