3 added 614 characters in body

# JavaScript ES6, 8782797474 70 bytes

(a,b={})=>a.map((l,i)=>[l=>[...a].sort((a,b)=>a-b).indexOf(l)+(b[l]=b[l]+1|0))


Don't like using an object but it seems to be the shortest way to keep track of dupes

## Explanation

(a,b={})=>          a is input
b stores the occurrences of each number
a.map(l =>        Loop over the array, l is item
[...a]            Copy a
.sort(...)       Sort in ascending numerical order
.indexOf(l)      Index of input in that array
+                 Add the following to account for dupes
(b[l]=            set and return the item l in hashmap b to...
b[l]+1           Increase the counter by one if it exists yet
|0               default is zero
)


# JavaScript ES6, 87827974 bytes

(a,b={})=>a.map((l,i)=>[...a].sort((a,b)=>a-b).indexOf(l)+(b[l]=b[l]+1|0))


Don't like using an object but it seems to be the shortest way to keep track of dupes

# JavaScript ES6, 87827974 70 bytes

(a,b={})=>a.map(l=>[...a].sort((a,b)=>a-b).indexOf(l)+(b[l]=b[l]+1|0))


Don't like using an object but it seems to be the shortest way to keep track of dupes

## Explanation

(a,b={})=>          a is input
b stores the occurrences of each number
a.map(l =>        Loop over the array, l is item
[...a]            Copy a
.sort(...)       Sort in ascending numerical order
.indexOf(l)      Index of input in that array
+                 Add the following to account for dupes
(b[l]=            set and return the item l in hashmap b to...
b[l]+1           Increase the counter by one if it exists yet
|0               default is zero
)

2 added 7 characters in body

# JavaScript ES6, 87828279 74 bytes

(a,b={})=>a.map((l,i)=>(b[l]=b[l]+1||1,[=>[...a].sort((a,b)=>a-b).indexOf(l)+b[l]-1+(b[l]=b[l]+1|0))


Don't like using an object but will tryit seems to find a betterbe the shortest way to keep track of dupes.

# JavaScript ES6, 8782 bytes

(a,b={})=>a.map((l,i)=>(b[l]=b[l]+1||1,[...a].sort((a,b)=>a-b).indexOf(l)+b[l]-1))


Don't like using an object but will try to find a better way to keep track of dupes.

# JavaScript ES6, 878279 74 bytes

(a,b={})=>a.map((l,i)=>[...a].sort((a,b)=>a-b).indexOf(l)+(b[l]=b[l]+1|0))


Don't like using an object but it seems to be the shortest way to keep track of dupes

1

# JavaScript ES6, 87 82 bytes

(a,b={})=>a.map((l,i)=>(b[l]=b[l]+1||1,[...a].sort((a,b)=>a-b).indexOf(l)+b[l]-1))


Don't like using an object but will try to find a better way to keep track of dupes.