You encountered a known bug. (the correcting pull request has already been submitted, AFAIK) The workaround is to never use a block as an argument of the to-binary function. The following code should work:
b: #{0102030405060708}
c: array (length? b)
repeat num (length? b) [
print [
{Setting location}
num
{to value of}
to-binary pick b num
]
poke c num to-binary pick b num
]
However, the whole code looks overcomplicated to me, and I would rather achieve your goal using:
b: #{0102030405060708}
c: make block! length? b
repeat num (length? b) [
print [
{Setting location}
num
{to value of}
copy/part at b num 1
]
append c copy/part at b num 1
]
If you want just to create a short (length 1) binary from an integer, you may use this formula:
append copy #{} 255