(Who to follow) Twitter widget

It looks like you’re saving a PHP std object in the database. It might be an array, I’d have to check how WordPress saves those. In either case:

If you’re using add_user_meta() or update_user_meta() to insert the user meta into the database (and you should be), then using get_user_meta() with the third parameter set to true should return a single object/array that is identical to the one that you inserted into the database.

$following_users = (object) [ '1' ]; /* or just the array */

update_user_meta( $user_id, 'my_user_meta_key', $following_users );

$users = get_user_meta( $user_id, 'my_user_meta_key', true );

$users and $following_users should be identical. So get the user IDs however you saved them.