The operator for assingment in F# is <- rather than =.
In your code you have:
let assign = diceValue.[i] = r
This is an equality test and it checks whether the value diceValue.[i] is equal to r. The result is a Boolean value that you assing to the variable assign.
If you want to mutate the array, you can do this using:
diceValue.[i] <- r
I'm not exactly sure what you are expecting to do with the assign variable. The assignment operation returns unit, which is a bit like void in other languages, so you do not get any useful result.
If you want to mutate all values in the array, then you will also need to define the array outside of the loop:
let random = new System.Random()
let diceValue = [|1;2;3;4;5|]
for i = 0 to 4 do
let r = random.Next(1,6)
diceValue.[i] <- r
And as a side-note, this can be done more nicely using the Array.init function, which initializes an array and calls the provided function to get a value for each of the elements of the array:
let diceValue = Array.init 5 (fun _ ->
random.Next(1,6))