Postman get value from JSON where equals a value in array using javascript

In Postnam test script, you can use some Javascript features. In your case, too many way to do. I will show you how to solve your case with Array.find function:

var jsonData = pm.response.json();
var user = jsonData.Customers.find(function(user) {
    return user.username === 'Billy';
    // OR you could config username in postman env
    // return user.username === pm.variables.get("username_to_find"); 
});
pm.environment.set("useridToken", user.userid);

find() as another answer points out is the best solution here, but if the username is not unique and you want an array of users where username is 'Billy' then use filter()

const jsonData = {
  "Customers": [{
      "id": 24,
      "userid": 73063,
      "username": "BOB",
      "firstname": "BOB",
      "lastname": "LASTNAME"
    },
    {
      "id": 25,
      "userid": 73139,
      "username": "Billy",
      "firstname": "Billy",
      "lastname": "lasty"
    }
  ]
}
console.log(jsonData.Customers.filter(c => c.username === 'Billy'))

You can use: Array.prototype.find():

const data = {
  "Customers": [{
      "id": 24,
      "userid": 73063,
      "username": "BOB",
      "firstname": "BOB",
      "lastname": "LASTNAME"
    },
    {
      "id": 25,
      "userid": 73139,
      "username": "Billy",
      "firstname": "Billy",
      "lastname": "lasty"
    }
  ]
}

const user = data.Customers.find(u => u.username === 'Billy')
const userid = user ? user.userid : 'not found'

console.log(user)
console.log(userid)