Custom_fields updated simultaneous cause value to turn into array

This sounds like the existing behaviour of custom fields and not a regression. There are a few ways to fix it:

  1. You can add a unique index on the custom field (name, user_id)
  2. You can surround your code with a DistributedMutex
  3. You can use a table design rather than custom fields